[Geopackage] GeoPackages: Are PK's really mandatory?

Jeff Yutzler jeffy at imagemattersllc.com
Thu Mar 21 15:46:17 EDT 2019


Stefan,
Primary keys are not strictly required on features tables. Part of the
reason for this is that we want to support views (see footnote K17
<http://www.geopackage.org/spec/#K17>) and a) SQLite can't do primary keys
on views and b) it is difficult if not impossible for a conformance test to
handle the distinction properly. We are in the process of clarifying how
views are supposed to work
<https://github.com/opengeospatial/geopackage/issues/446> and I will be
sure to make a blog post when we do.
Regards,
Jeff


On Thu, Mar 21, 2019 at 2:35 PM Keller Stefan <stefan.keller at hsr.ch> wrote:

> Hi Jeff
>
>
>
> I just stumbled over this issue:
>
>
> https://gis.stackexchange.com/questions/315547/is-a-pk-required-for-geopackage-vector-layers
>
>
>
> 1. Is a Primary Key really a MUST requirement in GeoPackages?
>
> 2. If yes, is this really actually a tech dept from SQLite?
>
> 3. Creating a PK field with null length as reported in the issue above
> looks like a smell to me.
>
>
>
> My impression is, that there are three actions to be considered:
>
> a. Clarification of the GeoPackage spec.
>
> b. Considering not to require mandatory PKs in the spec. (and not trying
> to do “SQlite magic” under the hood).
>
> c. (Outside scope of spec. Some enhancement in QGIS how it handles
> intersections/overlays).
>
>
>
> Yours, Stefan
>


-- 
Jeff Yutzler
Image Matters LLC <http://www.imagemattersllc.com/>
Mobile: (703) 981-8753
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengeospatial.org/pipermail/geopackage/attachments/20190321/85234feb/attachment.html>


More information about the Geopackage mailing list