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.
This is a minor suggestion but might make it less confusing working with the library:
Spatial.importOSM() adds a layer when a file cannot be found. Since there are no stats shown in the output on number of nodes added etc, it appears as if the layer have been imported successfully when it hasn't.
neo4j@neo4j> CALL spatial.importOSM("london.osm");
Failed to invoke procedure spatial.importOSM: Caused by: java.io.FileNotFoundException: london.osm (No such file or directory)
neo4j@neo4j> CALL spatial.importOSM("london2.osm");
Failed to invoke procedure spatial.importOSM: Caused by: java.io.FileNotFoundException: london2.osm (No such file or directory)
neo4j@neo4j> CALL spatial.layers();
+-------------------------------------------------------------------------------------------+
| name | signature |
+-------------------------------------------------------------------------------------------+
| "london.osm" | "EditableLayer(name='london.osm', encoder=GeometryEncoder(bbox='bbox'))" |
| "london2.osm" | "EditableLayer(name='london2.osm', encoder=GeometryEncoder(bbox='bbox'))" |
+-------------------------------------------------------------------------------------------+
3 rows available after 3 ms, consumed after another 2 ms
neo4j@neo4j>
This is a minor suggestion but might make it less confusing working with the library:
Spatial.importOSM() adds a layer when a file cannot be found. Since there are no stats shown in the output on number of nodes added etc, it appears as if the layer have been imported successfully when it hasn't.
neo4j@neo4j> CALL spatial.importOSM("london.osm"); Failed to invoke procedure
spatial.importOSM
: Caused by: java.io.FileNotFoundException: london.osm (No such file or directory) neo4j@neo4j> CALL spatial.importOSM("london2.osm"); Failed to invoke procedurespatial.importOSM
: Caused by: java.io.FileNotFoundException: london2.osm (No such file or directory) neo4j@neo4j> CALL spatial.layers(); +-------------------------------------------------------------------------------------------+ | name | signature | +-------------------------------------------------------------------------------------------+ | "london.osm" | "EditableLayer(name='london.osm', encoder=GeometryEncoder(bbox='bbox'))" | | "london2.osm" | "EditableLayer(name='london2.osm', encoder=GeometryEncoder(bbox='bbox'))" | +-------------------------------------------------------------------------------------------+3 rows available after 3 ms, consumed after another 2 ms neo4j@neo4j>