Skip to main content

CLI tool to bulk-download street-level imagery from Mapillary

Project description

cityzero

CityZero city selection screen

CLI tool to bulk-download street-level imagery from Mapillary at the biggest scales. Define a bounding box or pick a city and it discovers and downloads every available image in that area: upwards of 1–4 million images per major city, or 10–100k for individual neighbourhoods. GPS is embedded in EXIF, and downloads are resumable and fault-tolerant upon interruption thanks to a SQLite-based cache.

This tool was spun off from CityZero, where its original commit history can be found.

Install

pip install cityzero

Setup

You'll need to get a client token from mapillary.com/dashboard/developers and set it in your environment:

macOS / Linux

export MAPILLARY_CLIENT_TOKEN=MLY|...

Windows CMD

set "MAPILLARY_CLIENT_TOKEN=MLY|..."

Usage

# Interactive mode — pick a city, then download
cityzero

# Specify a city directly
cityzero --city "San Francisco"

# Custom bounding box
cityzero --bbox "-122.52,37.70,-122.35,37.83"

# Limit images (useful for testing)
cityzero --city "New York" --limit 100

# Show available cities
cityzero --list-cities

Options

Option Description
--city NAME Download from a predefined city
--bbox W,S,E,N Custom bounding box
--limit N Cap the number of images to download
--output-dir PATH Output directory (default: <city> or bbox# in current directory)
--preview Open an interactive map in the browser before downloading
--state STATE Resume behaviour: maintain | merge | rediscover
--granularity 1-100 Discovery thoroughness (default: 25)
--list-cities Show predefined cities and exit

Discovery states

When a previous run exists for a city:

State Behaviour
maintain Load from cache, skip API (default)
merge Re-discover and add new images to existing cache
rediscover Wipe cache and run a full fresh discovery

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cityzero-0.2.2.tar.gz (18.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cityzero-0.2.2-py3-none-any.whl (20.6 kB view details)

Uploaded Python 3

File details

Details for the file cityzero-0.2.2.tar.gz.

File metadata

  • Download URL: cityzero-0.2.2.tar.gz
  • Upload date:
  • Size: 18.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for cityzero-0.2.2.tar.gz
Algorithm Hash digest
SHA256 39510aa6d6a25724f14d58d82f5d95a1230fc67058ef9e7599a4a1811133cd69
MD5 f130fe1850c41c72f453750a16b3f9d5
BLAKE2b-256 8c1e7a059b9fc9a4b7b0fed5e67c66c48d03ffe46a44ec94e2c757fa6d4c1acc

See more details on using hashes here.

File details

Details for the file cityzero-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: cityzero-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 20.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for cityzero-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 77a87c747f43d0ebd83290eaa5aa4c9d8dc4c8bb85e7af57cc95283065880e35
MD5 8a0f7f23c96c666e45d8715d85e22a7e
BLAKE2b-256 f8685333bfa25bf18eabce2da1c47c39bfdd2fd4561225bc83843102bb93af63

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page