[gdal-dev] Schema of gpkg_metadata in Geopackage

Rahkonen Jukka (MML) jukka.rahkonen at maanmittauslaitos.fi
Wed Aug 23 23:19:19 PDT 2017


Hi,


Our document

http://www.gdal.org/drv_geopackage.html says that gpkg driver targets standard version 1.0/1.0.1. For me it seems that starting from GDAL 2.2 the target is version 1.2, it that right?


-Jukka Rahkonen-

________________________________
Lähettäjä: Even Rouault <even.rouault at spatialys.com>
Lähetetty: 23. elokuuta 2017 16:55
Vastaanottaja: gdal-dev at lists.osgeo.org
Kopio: Rahkonen Jukka (MML)
Aihe: Re: [gdal-dev] Schema of gpkg_metadata in Geopackage


On mercredi 23 août 2017 13:33:07 CEST Rahkonen Jukka (MML) wrote:

> Hi,

>

> 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

https://github.com/opengeospatial/geopackage/issues/243





But I see the http://www.geopackage.org/spec/#metadata_example_appendix is wrong...

Filed as https://github.com/opengeospatial/geopackage/issues/382





Even



--

Spatialys - Geospatial professional services

http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20170824/a8186cb6/attachment-0001.html>


More information about the gdal-dev mailing list