mansueto-institute / kblock

Python tools for generating street block delineations and geospatial attributes
GNU General Public License v3.0
1 stars 0 forks source link

PM tiles cloud job #57

Closed nmarchio closed 1 year ago

nmarchio commented 1 year ago

Recipe: https://gist.github.com/stuartlynn/b210e5edb740169ccf70a7dbf10bde69

Dependency: https://github.com/felt/tippecanoe

nmarchio commented 1 year ago

Scratch notes: https://docs.google.com/document/d/1gWnYYviN8frB7jJQrmHTqpJ0WfxuthrSNq9TnYPI-hw/edit

nmarchio commented 1 year ago

Improved recipe: https://github.com/Matico-Platform/pmtiles-utils

See issues in repo for next steps

nmarchio commented 1 year ago

This issue involves:

nmarchio commented 1 year ago

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:

nmarchio commented 1 year ago
manmartgarc commented 1 year ago
  • 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.