Skip to content

Commit

Permalink
Docs: update pmtiles.rst with examples (#9977)
Browse files Browse the repository at this point in the history
Added examples on translation from shape file and postgres/postgis
  • Loading branch information
baffioso authored May 21, 2024
1 parent 15a1d5b commit 39cad31
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions doc/source/drivers/vector/pmtiles.rst
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,18 @@ Extracting all content in a local directory:
python swig/python/gdal-utils/osgeo_utils/samples/gdal_cp.py -r "/vsipmtiles//vsicurl/https://protomaps.github.io/PMTiles/protomaps(vector)ODbL_firenze.pmtiles" out_pmtiles
Examples
--------
- Simple translation of a single shapefile into PMTiles. Dataset creation options (dsco) MINZOOM and MAXZOOM specifies tile zoom levels.
::

ogr2ogr -dsco MINZOOM=10 -dsco MAXZOOM=20 -f "PMTiles" filename.pmtiles my_shapes.shp

- Merge all PostgreSQL/PostGIS tables in a schema into a single PMTiles file. PostgreSQL table names are used as layer names. Dataset creation options (dsco) MINZOOM and MAXZOOM specifies tile zoom levels.
::

ogr2ogr -dsco MINZOOM=0 -dsco MAXZOOM=22 -f "PMTiles" filename.pmtiles "PG:host=my_host port=my_port dbname=my_database user=my_user password=my_password schemas=my_schema"


See Also
--------
Expand Down

0 comments on commit 39cad31

Please sign in to comment.