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
778 stars 192 forks source link

Routing on OSM Data #208

Closed boldtrn closed 8 years ago

boldtrn commented 8 years ago

Hi,

I'd like to create routes using OSM data and neo4j. Currently I am considering this plugin. Is this plugin beneficial for routing and is this plugin available for embeded databases?

Thanks in advance, Robin

craigtaverner commented 8 years ago

The spatial library can be used for routing and is in fact primarily for embedded use. However the OSM importing functionality builds a full OSM graph, which is far more than you need to route with, and will not perform well for routing. You should rather write your own importer that imports only the waypoints relevant to routing, like intersection points. Then use something like A* to route on that. On Nov 19, 2015 9:40 AM, "Robin" notifications@github.com wrote:

Hi,

I'd like to create routes using OSM data and neo4j. Currently I am considering this plugin. Is this plugin beneficial for routing and is this plugin available for embeded databases?

— Reply to this email directly or view it on GitHub https://github.com/neo4j-contrib/spatial/issues/208.

themmes commented 8 years ago

@craigtaverner It will not perform well because of additional non-intersection nodes in road segments? Or are there other reasons for it not to perform on routing?

craigtaverner commented 8 years ago

@themmes Correct. The primary issue will be that there will be a much, much longer path to route over if all OSM nodes are included. There are other more subtle issues though, like the fact that the OSM model does not clearly include turning restrictions, and you might want to add those for better routing. Another option to consider is creating a layered graph model with long distance routing in city-city graph for first approximation routing, followed by fine grained routing on the OSM model itself.