neo4j-contrib / spatial

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.
http://neo4j-contrib.github.io/spatial
Other
777 stars 191 forks source link

spatial.importOSM() adds a layer when a file cannot be found. #383

Open jamesdhope opened 2 years ago

jamesdhope commented 2 years ago

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>