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.

Home Page:http://neo4j-contrib.github.io/spatial

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Questions about Neo4j Spatial: Layer and Indexing Concerns

GAISLBS opened this issue · comments

Hello,

I have been using Neo4j Spatial and I've come across a few questions:

  1. Limitations concerning layers and spatial operations: I understand that to process spatial data in Neo4j Spatial, we need to create a layer and store the data there. However, when executing operations, I'm wondering if it performs operations against all spatial objects in the layer, or if we can selectively operate on specific or a subset of objects. For instance, consider the following query:
WITH "POLYGON((15.3 60.2, 15.3 60.4, 15.7 60.4, 15.7 60.2, 15.3 60.2))" as polygon
CALL spatial.intersects('layer_roads',polygon) YIELD node RETURN node.name as name

In this case, does it perform operations against all objects in the 'layer_roads' layer, or can we operate only on certain objects that meet specific conditions?

  1. Layer and Indexing: When a layer is created and data is added, is spatial indexing automatically generated for each addition, or is there a separate process required?

  2. Practicality and efficiency issues: Practically using Neo4j Spatial, it seems time-consuming to perform operations with all spatial objects in a single layer. Therefore, I thought of storing spatial data as regular properties of Neo4j nodes or relationships and then, when needed, create a Spatial layer for the operations. However, if indexing needs to be recreated for each layer, this seems inefficient. How can this issue be addressed? Or is there a more efficient method?

I look forward to receiving feedback on these concerns and hope to use Neo4j Spatial more effectively. Thank you!