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

WFS GetPropertyValue equivalent in OGC API Features #834

Open
maxcollombin opened this issue May 24, 2023 · 4 comments
Open

WFS GetPropertyValue equivalent in OGC API Features #834

maxcollombin opened this issue May 24, 2023 · 4 comments
Labels

Comments

@maxcollombin
Copy link

maxcollombin commented May 24, 2023

Is there any plan to have an equivalent to the GetPropertyValue operation in the WFS standard? This could allow attributes to be selected at:

  • https://[...]/collections/{collectId}/items/properties={property1},{property2}?f=json
  • https://[...]/collections/{collectId}/items/properties={property1},{property2}/{featureId}?f=json

It would also be interesting to have the possibility to get a list of unique values of (maybe with exceptions or limits) these properties but maybe this is planned in Part 3?

@cportele
Copy link
Member

Not exactly the same a GetPropertyValue from WFS, but selecting only a subset of the properties is planned with the part 'Property Selection', currently a proposal.

Example (GeoJSON, two properties, no geometry):

https://demo.ldproxy.net/strassen/collections/unfaelle/items?f=json&skipGeometry=true&properties=unfzeit,unfart

Same as CSV:

https://demo.ldproxy.net/strassen/collections/unfaelle/items?f=csv&skipGeometry=true&properties=unfzeit,unfart

If the API supports schemas, then the value range can be determined from the schema (but this will often be the allowed values, not necessarily the existing values).

Example:

https://demo.ldproxy.net/strassen/collections/unfaelle/schema

Note that this API implements the new Schema approach discussed in recent weeks (#740 (comment)).

Part 3 specifies the queryables and that schema should also declare the value range of the queryable properties:

https://demo.ldproxy.net/strassen/collections/unfaelle/queryables?f=json

Does this help?

@pvretano
Copy link
Contributor

Actually I interpreted this question a little differently ... my server can, instead of items, request properties so I can do something like this:

https://www.pvretano.com/cubewerx/cubeserv/default/ogcapi/zaatari/collections/AgricultureSrf/properties/UFI

and get an array of values from each features in the collection for the requested property ... UFI in this case. I can also append a feature ID and get the value for the specific, requested feature:

https://www.pvretano.com/cubewerx/cubeserv/default/ogcapi/zaatari/collections/AgricultureSrf/properties/UFI/CWFID.AGRICULTURESRF.0.1

This is a little differnt then the property selection extension. The property selection extension generates a "feature" but only containing the requested properties. However, you still get a feature/ featureCollection in the response. What I implemented simply returns the request property values with as little infrastructure around them as possible. It's a subtle difference I guess.

@cportele
Copy link
Member

I think you are correct. The properties={property1},{property2} looked like the Property Selection extension with a query parameter, but it is meant as a path parameter. This would be yet another extension - and I guess it would be reasonable to restrict it to a single property like in your examples.

That said, the Property Selection extension is not that much different (in particular in encodings like CSV) and would also support multiple properties.

@maxcollombin
Copy link
Author

maxcollombin commented May 26, 2023

Thank you for your answers, which are both useful and relevant.
@pvretano's answer is actually closer to my question, which I had also imagined in relation with Part 3. For example, we could use an item's property of an {collectionId} as part of a CQL expression for Comparison or a Spatial predicates if the selected property is a geometry.

To illustrate this, we'd have something like:

https://data.example2.org/collections/{collectId}/items?filter=CROSSES(geometry,(https://data.example1.org/collections/{collectId}/items/properties=geometry/{featureId}?f=json))&f=json

However, I'm not sure this is relevant and for the CQL spatial predicate, the geometry of the data.example1.org server should be returned in WKT format.

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

No branches or pull requests

3 participants