Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Support For CoverageJSON read/write #7937

Open
ShaneMill1 opened this issue Jun 14, 2023 · 2 comments
Open

Feature Request: Support For CoverageJSON read/write #7937

ShaneMill1 opened this issue Jun 14, 2023 · 2 comments

Comments

@ShaneMill1
Copy link

CoverageJSON is a community standard within the OGC: https://portal.ogc.org/files/102051. CoverageJSON is widely used within the OGC API - Environmental Retrieval. The ability to read and write CoverageJSON via GDAL would be extremely beneficial and allow for the expansion of tooling that can consume CoverageJSON.

Similar to #7399, it appears that adding a separate CoverageJSON driver would be beneficial.

@rouault
Copy link
Member

rouault commented Jun 14, 2023

Will require a "champion" to implement that and/or funding. Not totally clear how that fits in the GDAL data model. The GRID + NDArray part would match the multidimensional API . Other type of domains might not fit. Would require more analysis and actual use cases where GDAL would be useful.

@jerstlouis
Copy link
Contributor

jerstlouis commented Jun 19, 2023

@rouault The CoverageJSON data model is quite close to the netCDF model if I understand correctly.
If GDAL already supports regular & irregular grids + NDArray, this might work well for all the same use cases where netCDF works well.
Currently, EDR uses a single "values" property to describe both regular and irregular grids in the collection extent.

On a somewhat related note: we had recent discussions about a potential harmonization for describing both the domain and the range of geospatial data across OGC APIs, including the ability to describe both regular and irregular grids.

Whereas the "interval" describes the overall interval where there is data (the first interval being the overall interval, and optionally followed by additional sparse intervals within that where data is available), in a new proposed approach the "grid" property can describe both regular and irregular grid.

This is included as part of the unified additional dimensions schema and also as part of the "spatial" and "temporal" property of the extent in Maps and Tiles:

In all cases, a "cellsCount" is provided.
For regular grid, a "resolution" is provided.
If the value of the cells represent spans an area, cellsCount = (interval.high - interval.low) / resolution.
If the value of the cells represent spans a single point, cellsCount = (interval.high - interval.low) / resolution + 1.
For irregular grid, a list of "coordinates" is provided.

For the domain, the extent could describe both n-dimensional regular and irregular grids within the extent:

    "extent" : {
       "spatial" : {
          "bbox" : [ [ -180, -90, 180, 90 ] ],
          "grid" : [
             {
                "cellsCount" : 1024,
                "resolution" : 0.3515625
             },
             {
                "cellsCount" : 512,
                "resolution" : 0.3515625
             }
          ]
       },
       "temporal" : {
          "interval" : [ [ "2015-12-30", "2025-12-26" ] ],
          "grid" : {
             "cellsCount" : 3650,
             "resolution" : "P1D"
          }
       },
       "pressure" : {
          "crs" : "http://www.opengis.net/def/crs/OGC/0/barometric",
          "interval" : [
             [ 1000.0, 10.0 ]
          ],
          "grid" : {
             "cellsCount" : 8,
             "coordinates" : [ 1000.0, 850.0, 700.0, 500.0, 250.0, 100.0, 50.0, 10.0 ]
          }
       }
    },

We have an example of both regular and irregular grid here in this collection:

For the range, a Features - Part 5: Schema is being drafted that could be used across all OGC APIs to describe feature collection properties / coverage fields in the same manner, with support for semantic annotations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants