Some features available in s2geography that could be implemented in spherely with relatively little effort (i.e., straightforward functions returning simple types like bool, float, etc.):
For predicates that are not directly implemented in s2geography but that can be easily derived from another predicate, it is possible to use a lambda, like for within:
Some features available in s2geography that could be implemented in spherely with relatively little effort (i.e., straightforward functions returning simple types like bool, float, etc.):
Predicates:
Measurement:
One example with
intersects
s2geography API:
https://github.com/paleolimbot/s2geography/blob/764682d60f757383e5853a45a12404c84f3e5961/src/s2geography/predicates.h#L10-L12
spherely bindings:
https://github.com/benbovy/spherely/blob/e874e6091888db6c09d9aee79c3ff260224f635b/src/predicates.cpp#L37-L51
For predicates that are not directly implemented in s2geography but that can be easily derived from another predicate, it is possible to use a lambda, like for
within
:https://github.com/benbovy/spherely/blob/e874e6091888db6c09d9aee79c3ff260224f635b/src/predicates.cpp#L84-L100
Documentation:
https://github.com/benbovy/spherely/blob/main/docs/api.rst#predicates
Typing annotations:
https://github.com/benbovy/spherely/blob/0b7d3bbcce1dffbff9e283f6e15ff5c3497e26de/src/spherely.pyi#L104