// the find
neo4j-contrib/spatial
Neo4j Spatial is a library of utilities for Neo4j that faciliates the enabling of spatial operations on data. In particular you can add spatial indexes to already located data, and perform spatial operations on the data like searching for data within specified regions or within a specified distance of a point of interest.
Neo4j Spatial adds GIS capabilities to Neo4j: spatial indexes (RTree), geometry layers, and a full set of topological query operations (within, intersects, contains, etc.). It's for teams already committed to Neo4j who need to co-locate graph traversal with spatial queries — think routing, proximity searches, or OSM data modeled as a graph.
The RTree index is implemented in-graph, which means spatial queries compose naturally with Cypher graph traversals — you can find 'all nodes within 5km that are connected to node X' in a single query. The GeometryEncoder abstraction is genuinely flexible: WKB, WKT, native Neo4j Point, or custom encoders all plug in the same way. OSM support preserves the original topology as a connected subgraph rather than flattening it, which matters for routing and way-membership queries. Versioning is now aligned with Neo4j itself (5.x → 5.x), so you stop guessing which plugin matches which DB.
The installation requires `dbms.security.procedures.unrestricted=spatial.*`, which is a blanket security bypass — the README acknowledges this but the workaround (granting index creation inside WRITE-mode procedures) is a design smell that's been open for years. GeoServer/GeoTools integration is effectively unmaintained: the README says the 4.0 port 'has not been tested at all in any GeoTools enabled application', which makes that half of the feature surface unreliable. OSM import still requires a two-phase batch inserter workflow that predates Neo4j 4.x and the docs reference it without a clear statement that it actually works on current releases. If your use case is pure point lookups, Neo4j's native `Point` type with built-in spatial functions has caught up significantly and doesn't need this plugin at all.