ogcapi-features icon indicating copy to clipboard operation
ogcapi-features copied to clipboard

Custom feature responses

Open captaincoordinates opened this issue 4 years ago • 1 comments

I would like to suggest a change to the Features Core spec for consideration in future revisions. If this is not the correct place to make suggestions please direct me as appropriate.

Endpoints that return feature data, such as /collections/{id}/items, may not always need to return all of each feature's properties. For example: as an API caller I may want to know the names of the waterways that intersect a bounding box as specified in the bbox parameter. Because waterways can be extremely complex features, a GeoJSON response - complete with all vertices - could consume a significant amount of time and bandwidth in transit. Serializing and delivering large and complex geometries may consume server resources unnecessarily. This could also be true of other non-geometry feature properties.

I would like to suggest behaviour in the OGC API spec that permits an API caller to specify the properties of each feature that they would like returned, for example:

/collections/waterways/items?bbox=...&featureProperty=id&featureProperty=name

captaincoordinates avatar May 08 '21 00:05 captaincoordinates

Thank you for the comment. Yes, issues are a good way to start a discussion about a suggestion or proposal.

A capability that you have described has been in discussion for some time. The plan is not add this to Core, but to add this in a new part that extends Core.

Work on this part has just started. Here is a link to the current proposal:

https://github.com/opengeospatial/ogcapi-features/tree/master/proposals/property-selection

cportele avatar May 08 '21 06:05 cportele