Skip to content

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

@jamesdhope

Description

@jamesdhope

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions