geopython / pygeoapi

pygeoapi is a Python server implementation of the OGC API suite of standards. The project emerged as part of the next generation OGC API efforts in 2018 and provides the capability for organizations to deploy a RESTful OGC API endpoint using OpenAPI, GeoJSON, and HTML. pygeoapi is open source and released under an MIT license.
https://pygeoapi.io
MIT License
483 stars 258 forks source link

Adding the ability to filter on properties in the postgres provider #279

Closed mbucknell closed 4 years ago

mbucknell commented 4 years ago

Is your feature request related to a problem? Please describe. We are hoping to implement a OGC API service with a Postgres background and will need the ability to filter collections on property values in order to make it useful for our users. I saw the discussion in https://github.com/geopython/pygeoapi/issues/269 regarding this but wanted to call this out as a unique feature.

Describe the solution you'd like At the very least, we should have the ability to query on all property values other than the id and the geom column. An additional features might be to specify the exact properties to use in the config file.

Describe alternatives you've considered N/A

Additional context N/A

mbucknell commented 4 years ago

I plan on working on adding this feature and welcome any suggestions.

justb4 commented 4 years ago

Quick scan: is this also related to https://github.com/geopython/pygeoapi/pull/220 ? Implementation strategy: this feature will be generic, but not all Providers will be able to handle property filtering natively. Similar to a re-projection capability, see this discussion on Gitter.

Not sure if standard already provides API convention, but IMHO we should apply a common strategy here as well: Provider should indicate if it can handle property filtering, could be a simple boolean.

mbucknell commented 4 years ago

I believe it is related. There seems to be hooks in the providers for this but they aren't implemented at least in the case of postgres. I believe it is part of the standard: http://docs.opengeospatial.org/is/17-069r3/17-069r3.html#_parameters_for_filtering_on_feature_properties

mbucknell commented 4 years ago

This PR contains an example implementation: https://github.com/geopython/pygeoapi/pull/283

tomkralidis commented 4 years ago

Should we close this issue given #283 has been merged?

mbucknell commented 4 years ago

https://github.com/geopython/pygeoapi/pull/283 implements this feature. Closing issue.