brownag / gpkg

Utilities for the Open Geospatial Consortium (OGC) 'GeoPackage' Format in R
http://humus.rocks/gpkg/
Creative Commons Zero v1.0 Universal
18 stars 0 forks source link

GeoPackage validation routine #4

Open brownag opened 1 year ago

brownag commented 1 year ago
brownag commented 6 months ago

I think it should not be necessary to check for duplicate records--as unique constraints that (should be) set when creating required tables will cover this. If functions outside this package, and non-standard SQL is used, then the file is not a GeoPackage--technically speaking.

I don't think it is worth necessarily validating all triggers/unique/key constraints, but perhaps checking required gpkg_contents and gpkg_spatial_ref_sys table definitions against a lookup table would be a good addition. GDAL does it properly, the methods in this package do it properly, so it would simply be a protection against other avenues that might create these tables, or the user running custom gpkg_execute() statements