Is possible to check whether a WKT geometry intersects with another piece of geometry (via Cypher)?
For instance how would one do a spatial search against them to return any that intersect with a given bounding box?
For example, if I have spatially indexed nodes:
@NodeEntity
class Route {
@GraphId Long id;
@Indexed(indexType = IndexType.POINT, indexName = "routeSpatial") String wkt
}
and two such instances:
{ wkt: "LINESTRING (12 10, 14 12, 17 12, 18 10) }
and
{ wkt: LINESTRING (18 15, 18 12, 14 9, 14 6, 17 3, 20 3) }
it appears that:
@Query("START n=node:routeSpatial('bbox:[15.000000, 20.000000, 9.000000, 16.000000]') RETURN n")
doesn't return anything despite intersecting with both lines.
Whereas a bounding box fully surrounding both geometries,
@Query("START n=node:routeSpatial('bbox:[7.000000, 24.000000, 2.000000, 17.000000]') RETURN n")
returns both.
Can someone help me please?