Skip to content

Tiles generator: derive PMTiles bounds from the pyramid, reject unsupported config - #244

Merged
jampukka merged 1 commit into
nlsfi:mainfrom
jampukka:tiles/generator-fixes
Oct 18, 2026
Merged

jampukka merged 1 commit into
nlsfi:mainfrom
jampukka:tiles/generator-fixes

Conversation

@jampukka

Copy link
Copy Markdown
Collaborator

Follow-up to #243. PyramidBounds reads the written tile pyramid (gpkg_tile_matrix_set plus the srs_id -> CRS mapping) and works out the WGS84 bbox and center. PMTilesConvert uses it instead of hardcoded Finland defaults. GeneratorControl and TileSources do the startup validation. MvtTilesExtension in hakunapi-gpkg writes the gpkg_extensions row.

Behaviour changes

  • PMTilesConvert without --bbox or --center derives both from the pyramid. The Finland defaults are gone. For a CRS that is not 4326 or 3857 and has no projection factory on the classpath, it asks for --bbox.
  • A .collections key that clashes with a .collections key (source id equal to range name) is rejected at startup with a clear message.
  • A range filter that uses a CQL2 function fails at startup with "Unmapped Function (the generator registers no functions)". The README documents this.
  • The generated GeoPackage gets a gpkg_extensions row for the vector tile table, so other readers don't treat it as raster. GPKG now creates gpkg_extensions with IF NOT EXISTS and also creates it for tile-only files.
  • The README has a worked example and a PMTilesConvert section.

@jampukka
jampukka merged commit 68deca0 into nlsfi:main Oct 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant