opengeospatial / sensorthings

The official web site of the OGC SensorThings API standard specification.
135 stars 29 forks source link

Absolute references in filters #31

Open hylkevds opened 6 years ago

hylkevds commented 6 years ago

Is it allowed to use absolute references as filter parameters? For example: I have a Location with id 5, that is a polygon, can I say

give me all FeaturesOfInterest that are within Location 5

using the query: v1.0/FeaturesOfInterest?$filter=st_within(feature, /Locations(5)/location)

Since /Locations(5)/location resolves to a single geometry, this would be a nice way to get around the very verbose urls you get for spatial queries.

KathiSchleidt commented 3 years ago

Hiya, anything happening on this issue? Would be really valuable! Also - while we're at it, would be nice if the geometry could be valid geoJSON at the end of any reference - that way we could provide a reference to an OGC API - Features feature as providing the query geometry! :? Kathi

hylkevds commented 1 month ago

OData does this with the $root keyword:

5.1.1.14.5 $root

The $root literal can be used in expressions to refer to resources of the same service. It can be used as a single-valued expression or within complex or collection literals.

Example 108: all employees with the same last name as employee A1235 http://host/service/Employees?$filter=LastName eq $root/Employees('A1245')/LastName