VladimirAlexiev commented on issue #3717:
URL: https://github.com/apache/jena/issues/3717#issuecomment-4169677138
@lalewis1
> `FILTER(geof:sfWithin(?geom1, ?geom2))` do not hit the spatial index.
Yep. That's a boolean function that must have both of its arguments bound.
You don't need the index to check a relation between two geometries: you check
it in memory.
How do you bind the two args?
- I bet you pick them like `?geom1 a geo:Geometry. ?geom2 a geo:Geometry`.
- That's a Cartesian product. Assuming you have 10^6 geometries, this will
return 10^12 pairs to check: of course that will be slow
In contrast, prop functions (magic predicates) GENERATE candidate solutions.
I.e. if the right argument (object) is bound, they return only matching left
arguments (subjects) by using the index.
- `?geom geo:sfWithin ?envelope`: is the standard function
- `?feature spatial:intersectBoxGeom(?areaWkt)`: is an extension function as
shown by @Aklakan
- its right argument is a (singleton) rdf:List.
- I don't know whether it's also possible to pass several right arguments.
That is unclear from its documentation
https://jena.apache.org/documentation/javadoc/geosparql/org.apache.jena.geosparql/org/apache/jena/geosparql/spatial/property_functions/box/IntersectBoxGeomPF.html
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]