opengeospatial / geopackage

An asciidoc version of the GeoPackage specification for easier collaboration
https://www.geopackage.org
Other
264 stars 71 forks source link

Should relationship mapping tables be present in gpkg_contents? #679

Open nyalldawson opened 7 months ago

nyalldawson commented 7 months ago

This relates to discussion in https://github.com/OSGeo/gdal/pull/9258 . Currently gdal does not write the mapping tables to gpkg_contents, and this seems to be compliant with the extensions specifications.

But is this intentional? By omitting them from gpkg_contents there's a risk that a client wont know to also check for tables in gpkgext_relations, and consequently refuse to open the mapping table (as current gdal versions fail to do).

Is the intentional that a client should scan for available tables in both gpkg_contents and gpkgext_relations?

jyutzler commented 7 months ago

The expected operation is for the client to scan gpkg_extensions and use that as a guide for what secondary tables to open. When using the Related Tables Extension, a row for gpkgext_relations is added to gpkg_extensions as per https://opengeospatial.github.io/e-learning/geopackage/text/extensions/related_tables.html#id2 or https://docs.ogc.org/is/18-000/18-000.html#gpkg_extensions_records.