Opened 7 years ago

Closed 7 years ago

Last modified 5 years ago

#5521 closed enhancement (fixed)

GPKG: Aspatial Extension Support

Reported by: Robert Coup Owned by: Even Rouault
Priority: normal Milestone:
Component: OGR_SF Version: svn-trunk
Severity: normal Keywords: gpkg geopackage
Cc: ryanl

Description

As discussed on the GeoPackage list, this ticket provides a patch to add support for aspatial tables via a Geopackage extension.

  • New layers with no geometry column have rows added in gpkg_contents as data_type="aspatial"
  • The gpkg_extensions table is populated with the "gdal_aspatial" extension
  • The extension spec to be (eventually) located at http://gdal.org/geopackage_aspatial.html is included in Markdown & HTML.
  • "aspatial"-type tables listed in gpkg_contents are included in the layer lists found by GDAL if the extension is present. The existing (post-1.11) behaviour of returning all unknown tables as possible aspatial layers is dropped.

Attachments (2)

5521.1.patch (515.1 KB) - added by Robert Coup 7 years ago.
Patch v1
5521.2.patch (516.0 KB) - added by Robert Coup 7 years ago.
v2 includes doc update

Download all attachments as: .zip

Change History (7)

Changed 7 years ago by Robert Coup

Attachment: 5521.1.patch added

Patch v1

comment:1 Changed 7 years ago by Robert Coup

Cc: ryanl added

Changed 7 years ago by Robert Coup

Attachment: 5521.2.patch added

v2 includes doc update

comment:2 Changed 7 years ago by Even Rouault

Looks good to me. I let you apply ?

comment:3 Changed 7 years ago by Robert Coup

Resolution: fixed
Status: newclosed

Applied in [27463]

comment:4 Changed 7 years ago by Robert Coup

For future reference, I used grip to convert the Markdown spec to HTML, via

$ grip --gfm --export geopackage_aspatial.md geopackage_aspatial.html

comment:5 Changed 5 years ago by Even Rouault

Hum seeing this, I realize that the behaviour I introduced in r34467 "GPKG vector: list all tables/views by default (useful for non spatial tables not registered as aspatial). Add REGISTER_AS_ASPATIAL=YES/NO layer creation option to opt-out from registering a non-spatial table as aspatial" reverts to some behaviour of pre r27463. But there are quite a few geopackage DBs out of there that have aspatial tables without using aspatial extension, and it is desirable to be able to list those tables.

Note: See TracTickets for help on using tickets.