Cypher for Spatial
This example demonstrates the spatial capabilities of Neo4j’s Cypher query language by finding the nearest city to a given point in Germany. It shows how to combine geographic coordinates with graph traversal to return a ranked list of nearby cities, ordered by distance. The visualization uses `spatial.closest` from the Neo4j Spatial library, with a query that computes distances via the `distance()` function in kilometers. The accompanying data files include a GeoJSON point for the starting location and an exported CSV of city names with distances, while the code references adding a layer and populating it with cities from a Gist. The result is a straightforward map-based proximity search, rendered as a tabular list rather than a graphical map.
AI-generated description