From the last query we wrote, we can infer that the Marquis Theater is located within the Midtown Business District of Manhattan. But there is an easier way to find this information, thanks to the intersects procedure:
MATCH (p:POI {name: "MARQUIS THEATRE"})
CALL spatial.intersects("manhattan_districts", p) YIELD node as district
RETURN district.NAME
Now, we get only one result – Midtown Business District. We can even use the graph pattern to save this information by adding a relationship, CONTAINED_IN, between the point of interest and the matched district:
MATCH (p:POI {name: "MARQUIS THEATRE"})
CALL spatial.intersects("manhattan_districts", p) YIELD node as district
CREATE (p)-[:CONTAINED_IN]->(district)
In this way, we will have to perform the spatial query only once, when inserting the node or creating the data, and then rely on graph traversals and Cypher only to get the information...