[gdal-dev] Schema of gpkg_metadata in Geopackage
even.rouault at spatialys.com
Wed Aug 23 06:55:48 PDT 2017
On mercredi 23 août 2017 13:33:07 CEST Rahkonen Jukka (MML) wrote:
> GDAL 2.3-dev creates gpkg_metadata table as
> CREATE TABLE gpkg_metadata (id INTEGER CONSTRAINT m_pk PRIMARY KEY ASC NOT
> NULL UNIQUE,md_scope TEXT NOT NULL DEFAULT 'dataset',md_standard_uri TEXT
> NOT NULL,mime_type TEXT NOT NULL DEFAULT 'text/xml',metadata TEXT NOT NULL
> DEFAULT '');
> In GPKG standard v. 1.0.1 and 1.2 the SQL is
> CREATE TABLE gpkg_metadata (
> id INTEGER CONSTRAINT m_pk PRIMARY KEY ASC NOT NULL,
> md_scope TEXT NOT NULL DEFAULT 'dataset',
> md_standard_uri TEXT NOT NULL,
> mime_type TEXT NOT NULL DEFAULT 'text/xml',
> metadata TEXT NOT NULL
> It seems that UNIQUE was removed in 1.0.1 corrigendum.
You've good eyes ;-) I've just removed UNIQUE in trunk to align with latest specs, but I guess
that doesn't make a difference in practice (and validation checks are fine with or without
UNIQUE). A primary key is necessarily unique.
> I am not sure about
> what to think about having "metadata TEXT NOT NULL DEFAULT ''". In table 14
> in standard version 1.0.1 and also in table 32 in standard v. 1.2 there is
> an empty string as a default value but it does not reflect to the CREATE
> TABLE example.
In the live spec at http://www.geopackage.org/spec/#gpkg_metadata_sql , the example is
metadata TEXT NOT NULL DEFAULT '' . Spec was fixed per
But I see the http://www.geopackage.org/spec/#metadata_example_appendix is wrong...
Filed as https://github.com/opengeospatial/geopackage/issues/382
Spatialys - Geospatial professional services
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gdal-dev