Menu

#276 geopackage output may be incorrect

latest_beta_version
open
nobody
None
5
2023-03-28
2015-03-17
Brett
No

geopackage output may be incorrect

References:
Geopackage spec (http://www.geopackage.org/spec/#_tile_matrix_set)
WMTS spec (http://portal.opengeospatial.org/files/?artifact_id=35326 Annex H.1 specifically)

The way the gpkg_tile_matrix table's matrix_width and matrix_height columns are populated might be wrong. I think the width and height are supposed to say how many tiles -could- fit into the bounding region as specified by gpkg_contents min/maxs, not how many tiles are actually in the gpkg file.

Example:
What I expect for a tile set that contains the whole globe and has 1 tile for zoom_level 0, and 1 for zoom_level 19

TABLE gpkg_tile_matrix
ROW 1
COL zoom_level 0
COL matrix_width 1
COL matrix_height 1
other COLS...

ROW 2
COL zoom_level 19
COL matrix_width 524288 (where MOBAC seems to put 1 here, since only 1 tile exists for this zoom in this file)
COL matrix_height 524288 (where MOBAC seems to put 1 here, since only 1 tile exists for this zoom in this file)
other COLS...

I feel this is correct, since it provides a simpler means of finding a tile x/y from a coordinate x/y, and the number of rows/cols for a zoom_level is easily found with a query, where expected number of rows/cols isn't.

I'm not 100% convinced since I only have 1 other geopackage source to compare against and it has a different, more obviously wrong, bug.

Discussion

  • r_x

    r_x - 2015-03-18

    Yes, GeoPackage output is incorrect/defect.
    However I don't understand this format. Therefore I decided to abandon it. Further releases will not include it anymore.

    If you have the knowledge and skill to correct the implementation you are welcome to fix it.

     
  • Brett

    Brett - 2015-03-20

    Got a possible fix in the works. Waiting for access to examples from other sources to compare against to make sure it makes valid geopackages. Should have access to ones generated by ArcGIS within a few days.

     

Log in to post a comment.