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. In addition classes are provided to expose the data to geotools and thereby to geotools enabled applications like geoserver and uDig.
Version 0.28 begins work on trying to deal work multiple OSM imports. For this release, we disallow importing the same OSM file twice, unless you specify two separate layers, and we also ensure that the indexes are not mixed up between the layers, something that was the case in all previous releases.
To achieve this, two main changes were made:
Use unique labels for indexing within multiple OSM layers.
Essentially when adding nodes of a particular label, we also add a label with a unique name for indexing purposes.
The unique name is made of the original name plus a hex suffix made of the MD5 hash of the layer name.
For example, the layer geom1 will have an MD5 hash of its name 9ECE5459EA0D46FC556E5E3F454A0795.
Then when adding an OSM node we label the node with both:
OSMNode
OSMNode_9ECE5459EA0D46FC556E5E3F454A0795
Remove use of old reference nodes, reducing deadlocks.
This change is not backwards compatible, as the spatial model is different. Layers created in earlier versions would not be readable in this one.
To protect against that we throw exceptions on all SpatialDatabaseService. layer finding methods, if they detect the old format. The exception requests that the database be upgraded.
This can be done in the Java API with the upgradeFromOldModel method, or via procedures using spatial.upgrade.
Version 0.28 begins work on trying to deal work multiple OSM imports. For this release, we disallow importing the same OSM file twice, unless you specify two separate layers, and we also ensure that the indexes are not mixed up between the layers, something that was the case in all previous releases.
To achieve this, two main changes were made:
Use unique labels for indexing within multiple OSM layers. Essentially when adding nodes of a particular label, we also add a label with a unique name for indexing purposes. The unique name is made of the original name plus a hex suffix made of the MD5 hash of the layer name. For example, the layer
geom1
will have an MD5 hash of its name9ECE5459EA0D46FC556E5E3F454A0795
. Then when adding an OSM node we label the node with both:Remove use of old reference nodes, reducing deadlocks. This change is not backwards compatible, as the spatial model is different. Layers created in earlier versions would not be readable in this one. To protect against that we throw exceptions on all SpatialDatabaseService. layer finding methods, if they detect the old format. The exception requests that the database be upgraded. This can be done in the Java API with the upgradeFromOldModel method, or via procedures using
spatial.upgrade
.