togeojsontiles
togeojsontiles is a Python 3 package with bindings for tippecanoe (C++) and togeojson (javascript) that allows to create geojson vector tiles, tiles/{z}/{x}/{y}.geojson, from gpx, mbtiles or geojson files.
The tiles allow to display large amounts of vector data on interactive maps without losing performance.
The generated tiles can be shown on interactive slippy map like OpenLayers and Leaflet.
Installation
$ pip install togeojsontiles
Dependencies
This package provides Python bindings for tippecanoe (C++) to create the tiles, and togeojson (javascript) to convert gpx to geojson. These libraries do all the work and are required.
tippecanoe
See tippecanoe for installation instructions. It has a few system level dependencies, but is rather easy to build.
togoejson
To install togoejson (javascript) in your path,
$ npm install -g togeojson
Usage
gpx to geojson
import togeojsontiles
togeojsontiles.gpx_to_geojson(file_gpx='test.gpx', file_geojson='test.geojson')
geojson to mbtiles
import togeojsontiles
TIPPECANOE_DIR = '/usr/local/bin/'
togeojsontiles.geojson_to_mbtiles(
filepaths=['./data/test1.geojson', './data/test2.geojson'],
tippecanoe_dir=TIPPECANOE_DIR,
mbtiles_file='out.mbtiles',
maxzoom=14
)
mbtiles to geojson-tiles
import togeojsontiles
TIPPECANOE_DIR = '/usr/local/bin/'
togeojsontiles.mbtiles_to_geojsontiles(
tippecanoe_dir=TIPPECANOE_DIR,
tile_dir='project/data/tiles/',
mbtiles_file='out.mbtiles'
)
Metadata
Release files for togeojsontiles 0.1.2
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 | |
|---|---|---|---|---|
| togeojsontiles-0.1.2.tar.gz | 3.4 kB | Without provenance | Details |
Release files / togeojsontiles-0.1.2.tar.gz
| Download URL | togeojsontiles-0.1.2.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3d57d139a40be4185e2a5324444e141ccf8d12e33727033dd848fbf8e2883763
|
|
BLAKE2b-256 checksum How to use checksums |
0fb28164d868eaf649d9884361c61e868a93cece5258c58cb81dd2e5bb57ec78
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for togeojsontiles 0.1.2
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.