Skip to content

Compound CRS for Gridded Data Extension #676

@jamesresslernga

Description

@jamesresslernga

Using a Compound CRS for gridded data.

How does GeoPackage specify a compound CRS in the gpkg_spatial_ref_sys table, which has a singular srs_id and no provision to specify the Vertical CRS?

While some Compound CRS have a unique EPSG code (https://www.opengis.net/def/datum/EPSG/0/9518 for the 4326+3855 compound SRS), most compound CRS do not have a unique code.

Reading the remarks in 2016-17cited below about lack of support for Compound CRS, seems to discourage using a Compound CRS in GeoPackage. Is that view still valid in 2024, or has a method been found in the gpkg tables to indicate a gridded dataset references a Compound CRS, other that the WKT definition itself?

Without using some novel encoding in gpkg_spatial_ref_sys, only stating the horizontal CRS would not inform GeoPackage clients that the CRS is 3D. The WKT2 definition of Compound CRS is defined in OGC 18-010r7 (WKT2). One option is for GeoPackage clients to detect a Compound CRS by examination of the WKT for “COMPOUNDCRS” and extract the VERTCRS . Is using WKT to find VERTCRS a consistent method to determine whether a GeoPackage gridded data set uses a 3D Compound CRS?

Previous Remarks.
In the gridded data extension OGC 17-066r1, Requirement 5 for gpkg-contents includes a remark :
NOTE: Ideally for elevation data the vertical datum for each pyramid of elevation will be specified. However, it is impractical to mandate this for a number of reasons, including the difficulty in testing whether a specific SRS has a valid vertical datum.

In the OGC Elevation Extension interoperability experiment report (OGC 16-094r3), comments considered using a HORIZ CRS and VERT CRS, but this was not implemented in the Gridded data extension. Section 10.3 on CRS in the 16-094r3 report comments on the lack of client support for compound CRS and appears to discourage use of Compound CRS in GeoPackage.

The intent of the 3D CRS requirement was to explicitly specify the horizontal datum, projection, and coordinate system as well as the vertical datum and height type within a single EPSG code. Several participants expressed concern with this approach. The main concern is the lack of 3D CRS implementations in the software used to both create and read OGC GeoPackages and the limited variety of 3D CRSs currently specified in the EPSG CRS registry.

While creating a custom WKT to describe a 3D SRS offers a great amount of flexibility to GeoPackage elevation extension producers, this approach may ultimately hinder interoperability. Software clients that currently read WKT strings will need to be expanded to interpret a wide variety of non-standard, custom WKT strings, and software clients that do not currently read the WKT will need to add support. There was a general consensus among IE participants that specifying a 2D CRS plus a vertical CRS for each elevation data tile table is the preferred approach.

Furthermore, in an issue Specifying 3D CRSs · Issue #19 · opengeospatial/geopackage-tiled-gridded-coverage (github.com), Jeff Yutzler concluded:

The concerns stem from pretty poor support for doing any kind of reprojection using 3D SRS (e.g. GeoTools can't do that, impacts on GeoServer and some Java-based desktop applications, amongst others) and the lack of defined EPSG (or other standards body) codes for a 3D equivalent for a lot of 2D codes.

It was suggested that you can just create your own 3D SRS. Sure, but implementations will always be patchy in how well they interpret more "creative" WKT; and we'd also need to look at srs_auth namespacing and likely other unintended consequences. For example, that would break SpatiaLite geopackage support - it doesn't read the WKT.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions