-
-
Notifications
You must be signed in to change notification settings - Fork 314
Description
Description
Across pygeoapi providers, there is inconsistent behavior of the id_field parameter as it pertains to the output GeoJSON feature properties. Some providers remove the field from the properties block, while most appear to leave the field in, some explicily pop it from this object.
The primary issue is that pygeoapi lists the id_field column in both the collection queryables and collection schema. However the offered field will only ever be returned as feature id. Some providers even go as far as to make sure the id_field is correctly cast in the offered fields, further confusing me as to the correct behavior.
Another note is that we explicitly exclude the id_field from appear twice in the HTML, suggesting it is expected and tolerable to retain the id_field value both in the properties block and as the feature id.
Steps to Reproduce
-
Visit:
https://demo.pygeoapi.io/master/collections/dutch_windmills/schema -
Filter by desired
gml_id
https://demo.pygeoapi.io/master/collections/dutch_windmills/items?gml_id=Molens.1 -
Offered field is not in response with offered key.
Expected behavior
Collection schema are returned in the response with the correct key
Screenshots/Tracebacks
If applicable, add screenshots to help explain your problem.
Environment
- OS: All
- Python version: 3.12
- pygeoapi version: 0.22.dev0
Additional context
Add any other context about the problem here.