What is the difference between the 'Spatial' built into Neo4j and the community spatial plugin?

I noticed that the original post has become a little dated. Based on an answer I gave in the neo4j-users slack channel, I thought I'd add some more current information.

  • Neo4j 4.1 still has the same spatial support as Neo4j 3.4 (ie. only one new property type 'Point', and arrays of points). The Coordinate is just an in-memory type representing the Points coordinate without the units or coordinate reference system. Read more about these concepts in the Neo4j Cypher documentation at Spatial values - Cypher Manual
  • There are three spatial libraries written and published under the neo4j-contrib organisation: spatial, osm and spatial-algorithms
    • spatial is an old library that wraps the well known JTS and Geotools libraries, and so gives a lot of power (like a full GIS), but was originally designed for embedded database use, so might not be that ideal for a high concurrency production environment. It has NOT been ported to Neo4j 4.x yet (that is work in progress).
    • osm is an extract of the OSM support from the old spatial library, re-written to use a much faster offline bulk importing framework, and including a number of useful Cypher procedures for modeling OSM data for geoprocessing and routing (as demonstrated in my GraphConnect and NODES2019 videos). It has been ported to Neo4j 4.0 (might even work for 4.1, but not tested)
    • spatial-algorithms is a ground-up implementation of a few useful spatial algorithms (as demonstrated in my NODES2019 talk). It is a prototype and work-in-progress, written mostly by an intern 'Stef van der Linde'. If you are interested in writing spatial algorithms, this is a great starting point. It has been ported to Neo4j 4.0. It can make use of data imported using the osm library.
  • There is no routing support built into any of the above, and you would need to use another implementation of something like A* for that. However, as mentioned in my GraphConnect talk, the osm library and the talk show how to configure a graph like OSM for use with an A* algorithm. We used the one published by APOC, but you could just as well use routing algorithms from GDS also.

Videos covering this: