Skip to main content

Dump vector tiles to GeoJSON from remote URLs or local system files.

Project description

python-vt2geojson Build Status

Dump vector tiles to GeoJSON from remote URLs or local system files.

Inspired from


pip install vt2geojson


Using the CLI:

vt2geojson --help

Making a GeoDataframe from a PBF vector tile file:

import geopandas as gpd
import requests

from import vt_bytes_to_geojson


x = 150
y = 194
z = 9

url = f"{z}/{x}/{z}.vector.pbf?access_token={MAPBOX_ACCESS_TOKEN}"
r = requests.get(url)
assert r.status_code == 200, r.content
vt_content = r.content

features = vt_bytes_to_geojson(vt_content, x, y, z)
gdf = gpd.GeoDataFrame.from_features(features)


  • Add more test using vector-tile/test/fixtures/*.vector.pbf data files.


This library has only been tested against Python 3.6.

Feel free to submit your issues.

Project details

Download files

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

Files for vt2geojson, version 0.2.0
Filename, size File type Python version Upload date Hashes
Filename, size vt2geojson-0.2.0-py3-none-any.whl (6.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size vt2geojson-0.2.0.tar.gz (10.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page