opengeospatial / ogcapi-environmental-data-retrieval

A Web API that provides a family of lightweight interfaces for accessing Environmental Data resources.
https://ogcapi.ogc.org/edr
59 stars 26 forks source link

clarify data_query key and name #566

Open tomkralidis opened 1 month ago

tomkralidis commented 1 month ago

Using a snippet from the example collection metadata on schemas.opengis.net:

                "position": {
                    "link": {
                        "href": "https://example.org/edr/collections/hrly_obs/position?coords={coords}",
                        "hreflang": "en",
                        "rel": "data",
                        "templated": true,
                        "variables": {
                            "title": "Position query",
                            "description": "Position query",
                            "query_type": "position",
                            "coords" :{
                                "description": "Well Known Text POINT value i.e. POINT(-120, 55)"
                            },
                            "output_formats": [
                                "CoverageJSON",
                                "GeoJSON",
                                "IWXXM"
                            ],
                            "default_output_format": "IWXXM",
                            "crs_details": [
                                {
                                    "crs": "CRS84",
                                    "wkt": "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994328,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4326\"]]"
                                }
                            ]    
                        }

What is the value of the variables.query_type property (which duplicates its "grandparent" key)? By way of this query type definition, one can determine the query type without requiring variables.query_type (which is required in JSON schema definition)?

chris-little commented 1 month ago

@tomkralidis @m-burgoyne As an aside, perhaps the example for locations query should have title and description as locations query rather than location query?

chris-little commented 1 month ago

@tomkralidis @m-burgoyne Having a variables.query_type property does seem surplus. Does the top level context clearly identify the position property as an EDR query_type?

tomkralidis commented 1 month ago

@tomkralidis @m-burgoyne Having a variables.query_type property does seem surplus. Does the top level context clearly identify the position property as an EDR query_type?

I should have included more of the original example/snippet, see below (note the data_queries object):

            "data_queries" : {
                "position": {
                    "link": {
                        "href": "https://example.org/edr/collections/hrly_obs/position?coords={coords}",
                        "hreflang": "en",
                        "rel": "data",
                        "templated": true,
                        "variables": {
                            "title": "Position query",
                            "description": "Position query",
                            "query_type": "position",
                            "coords" :{
                                "description": "Well Known Text POINT value i.e. POINT(-120, 55)"
                            },
                            "output_formats": [
                                "CoverageJSON",
                                "GeoJSON",
                                "IWXXM"
                            ],
                            "default_output_format": "IWXXM",
                            "crs_details": [
                                {
                                    "crs": "CRS84",
                                    "wkt": "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994328,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4326\"]]"
                                }
                            ]    
                        }
                    }                    
                },
m-burgoyne commented 1 month ago

@tomkralidis @chris-little The variables.query_type property is just a duplicate of the grandparent key, so it could be dropped from the collections response without losing any of the information. required by a user to construct a query

chris-little commented 1 month ago

@m-burgoyne @tomkralidis Will there be a separate PR to removed the duplicaton, or will it be added to an existing PR?

m-burgoyne commented 1 month ago

@chris-little It could be implemented as part of EDR v1.2