Skip to content

Instantly share code, notes, and snippets.

View canales's full-sized avatar

Diego Canales canales

View GitHub Profile
@cbeddow
cbeddow / download_apiv4.py
Last active June 13, 2023 22:59
Python script for downloading data from Mapillary API v4 in a bounding box
import mercantile, mapbox_vector_tile, requests, json
from vt2geojson.tools import vt_bytes_to_geojson
# define an empty geojson as output
output= { "type": "FeatureCollection", "features": [] }
# vector tile endpoints -- change this in the API request to reference the correct endpoint
tile_points = 'mly_map_feature_point'
tile_traffic_signs = 'mly_map_feature_traffic_sign'
tile_coverage = 'mly1_public'