Currently every plugin will search the whole StaticRTree until a matching bearing segment is found - no matter how far away it is. For a lot of users this is an unexpected result and can have serious performance implications (even on accident).
Hence to make the user aware that it actually only makes sense to search in a specific search radius, say 100m when using the bearings filter, we should enforce this on the API level.
This means in case of no segment with the given bearing value in the search radius we will return NoSegment which is a better indicator then just returning a coordinate potentially across the Atlantic.
Two options for implementing this:
bearings without setting radius will error (invalid request)
bearings implies that radius=SOME_DEFAULT_VALUE
I would prefer option 1 because it makes it more explicit that we changed the behavior.
Currently every plugin will search the whole StaticRTree until a matching bearing segment is found - no matter how far away it is. For a lot of users this is an unexpected result and can have serious performance implications (even on accident).
Hence to make the user aware that it actually only makes sense to search in a specific search radius, say 100m when using the bearings filter, we should enforce this on the API level.
This means in case of no segment with the given bearing value in the search radius we will return
NoSegmentwhich is a better indicator then just returning a coordinate potentially across the Atlantic.Two options for implementing this:
bearingswithout settingradiuswill error (invalid request)bearingsimplies thatradius=SOME_DEFAULT_VALUEI would prefer option 1 because it makes it more explicit that we changed the behavior.