Skip to content

Spatial 0.28.0-neo4j-4.2.3

Compare
Choose a tag to compare

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.