python-vt2geojson 
Dump vector tiles to GeoJSON from remote URLs or local system files.
Inspired from https://github.com/mapbox/vt2geojson.
Installation
pip install vt2geojson
Usage
Using the CLI:
vt2geojson --help
Making a GeoDataframe from a PBF vector tile file:
import geopandas as gpd
import requests
from vt2geojson.tools import vt_bytes_to_geojson
MAPBOX_ACCESS_TOKEN = "*****"
x = 150
y = 194
z = 9
url = f"https://api.mapbox.com/v4/mapbox.mapbox-streets-v6/{z}/{x}/{y}.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)
Todos:
- Add more test using
vector-tile/test/fixtures/*.vector.pbfdata files.
Notes
This library has only been tested against Python 3.6.
Feel free to submit your issues.
Metadata
Release files for vt2geojson 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vt2geojson-0.2.1.tar.gz | 10.8 kB | Without provenance | Details for vt2geojson-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vt2geojson-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for vt2geojson-0.2.1-py3-none-any.whl |
Total release size: 17.8 kB
Release files / vt2geojson-0.2.1.tar.gz
| Download URL | vt2geojson-0.2.1.tar.gz |
|---|---|
| Size | 10.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bba39788ed8f019e8d30cedc9cefe8f4c8cb51c5e4906349fe1929d48a5092e2
|
|
BLAKE2b-256 checksum How to use checksums |
5f6656b8f7eab94b62e7ce1622a0788a81ee0282e022716b0c26f482a4f242f5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/57.0.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.6.9
|
Release files / vt2geojson-0.2.1-py3-none-any.whl
| Download URL | vt2geojson-0.2.1-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7da0b1f9f7020769c50bf8371a4f7db84297adb7ec1ef7dc7afc9d322cac6def
|
|
BLAKE2b-256 checksum How to use checksums |
ca59ecc3e402c102abadb7fbc742d126afedbf3bb36038cf92b4ac5472479e7f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/57.0.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.6.9
|
Security for vt2geojson 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.