sofwerx / cdb2-concept

CDB modernization
0 stars 1 forks source link

Capture Geometry Definitions in CDB Metadata #22

Open UnclePoole opened 3 years ago

UnclePoole commented 3 years ago

The CDB 1.1 XML metadata does not currently provide a well-defined list of the valid geometry types, although this list is implicitly specified by various parts of the human-readable specification. This requires mapping CDB 1.1 definitions to the proposed CDB X GGDM definitions making some hard-coded assumptions based on the human-readable specification.

The proposed CDB X data dictionary includes a table for Geometry definitions to include a name, an ID, and an optional 5-letter code (NAS defines geometry types using FACC-style 5 letter codes). The table for Entity definitions would also have a field to reference the default geometry type for a particular feature type (this can be mapped from geometry part of the "Recommended Dataset Component" element in the CDB 1.1 feature metadata XML). The table for Entity/Attribute constraints could have an optional filter to specify that an attribute is valid for a particular feature type only for specific geometries - e.g. WID is only valid for Point and Curve geometry but not Surface.

It would also be ideal to capture the constraints to specify which geometry types are valid for which dataset types in the metadata to avoid clients needing to make hard-coded assumptions about this.

Capturing geometries explicitly also provides an extension point for users to rigorously define additional geometry types to extend CDB, although this is likely to be rare in practice.

For completeness, the list of geometries should also include a "Coverage" raster type and a "Mesh" type so that users can define new extended dataset types that use those representations in a rigorously-described way as well as capture the existing datasets such as Elevation that use such types.

In principle the list of valid geometries and the constraint of geometries to datasets could be captured as a backward compatible update to the CDB 1.x metadata XML as well, as an update to the Datasets.xml file schema.

cnreediii commented 3 years ago

@UnclePoole - The CDB SWG to did some work to help resolve this issue. Check out the table in the beginning of CDB Volume 1 Introduction to Vector Datasets. This table does a crosswalk between GeoPackage and Shapefile geometry terminology. Perhaps another column needs to be added for Simple Features Geometry. There is also a slight move toward providing more information on file types used in a CDB data store - but not yet down to the geometry or image type within a file type. Check out https://github.com/opengeospatial/cdb-release-notes/blob/master/clause-6-substantive.adoc for some information on this 1.2 enhancement.

UnclePoole commented 3 years ago

@cnreediii Thanks, I will note my analysis was based on the published CDB 1.1 specification so anything addressed in CDB 1.2 I will have missed. I will update with any information on CDB 1.2.