Closed nmarchio closed 1 year ago
Improved recipe: https://github.com/Matico-Platform/pmtiles-utils
See issues in repo for next steps
This issue involves:
docker run -it osgeo/gdal:latest
and https://github.com/felt/tippecanoe then install pmtiles-utils requirements Data link: https://uchicago.box.com/s/7x1d4zg6xilbzpv0jdtan2cs9bpv08l2
Store data in root directory and run:
# Check if mali.fgb is present if it isn't run:
python3 convert --input=mali.gpkg --output=mali_z08-11.pmtiles --config=tiles_config_z08-11.yaml --retain=True
# retain=True keeps the intermediary files .fgb and .mbtiles
# Check if mali.fgb is present if it *is* run:
python3 convert --input=mali.fgb --output=mali_z08-11.pmtiles --config=tiles_config_z08-11.yaml --retain=False
python3 convert --input=mali.fgb --output=mali_z11-14.pmtiles --config=tiles_config_z11-14.yaml --retain=False
Converts mali.gpkg
> mali.fgb
> mali_z08-11.mbtiles
> mali_z08-11.pmtiles
Feature enhancements to the pmtile-utils repo:
maximum-zoom: __maxzoom__
the use sed
in bash to replace maxzoom with an arbitrary number.
- test gpkg to fgb conversion using ogr2ogr to see its faster
Running with pyogrio
took 33.05s while running with ogr2ogr took 19.36s.
This is for converting .gpkg
files to .fgb
.
Recipe: https://gist.github.com/stuartlynn/b210e5edb740169ccf70a7dbf10bde69
Dependency: https://github.com/felt/tippecanoe