One important point about routing over OSM is that the current OSMImporter as provided by Neo4j Spatial, actually builds a complete graph of the complete OSM dataset imported, which is very much more than needed for routing. If you wish to route over the true OSM graph, the algorithm will be complex (since OSM is complex), and inefficient.
What is really needed is a waypoint-waypoint graph that represents only the information relevant to routing. We have considered building this graph as part of the OSMImporter, which will allow your routing to be fast. This does not, however, get past the problem Peter mentioned, which is the OSM import is slow for larger datasets. If we imported only the necessary information for building the waypoint-waypoint graph, the import should be faster, and the routing faster. This is, however, not just a matter of ignoring information in the OSM import. To some extent the entire OSM model needs to be processed (although not stored) in order to identify all the relevant waypoints and to calculate the costs (distance) parameters for the relationships between them. My personal view is that this is quite achievable in a reasonable time, but does require a little careful thinking. On Fri, Jan 10, 2014 at 11:40 AM, Peter Neubauer < peter.neuba...@neotechnology.com> wrote: > Angelo, > no, A* is currently not exposed, mostly due to the fact that we couldn't > come up with a nice way to provide generic parameters over REST to it. You > can easily just expose it via a Plugin, see > http://docs.neo4j.org/chunked/milestone/server-plugins.html with the > parameters you need. > > Regarding performance, Michael and I want to get the OSM import into a > shape where you actually can load Germany or Italy as a whole. Right now it > slows down a lot and we know that it is the Lucene Index lookups, we just > need to get a few more hours together to test our custom index for that :) > > When you have the data in (try it with a smaller region) you should be > able to write your routing, but I think with OSM, a simple A* is not going > to cut it, since not all relationships are actually relevant for the > routing (e.g. you only want to count in WAYs etc), so I guess it takes some > thinking to come up with the right algo, or you extract a derived graph > that is just your routing-relevant info and maybe do your A* on that one? > > /peter > > > G: neubauer.peter > S: peter.neubauer > P: +46 704 106975 > L: http://www.linkedin.com/in/neubauer > T: @peterneubauer > > Neo4j 2.0.0 - > (graphs)-[:FOR]->(everyone)<http://blog.neo4j.org/2013/12/neo4j-20-ga-graphs-for-everyone.html> > Do something useful - Teach your kids 1 hour code! <http://code.org/learn> > > > On Fri, Jan 10, 2014 at 9:34 AM, Angelo Immediata <angelo...@gmail.com>wrote: > >> Hi there >> >> I'm using this environment: >> >> - spring 3.2.6 >> - spring-data-neo4j 2.3.3 (I'm thinking to upgrade to the version 3 >> in order to have support for neo4j 2.0) >> - neo4j 1.9.5 >> >> >> I'm thinking to use neo4j in order to store our own graph that will be >> used in a route planner project. The first question is if this seems to you >> (sure more experts than me) a good solution in order to build a very good >> and efficient and performant route planner >> Moreover as far as I know (by reading this link >> http://docs.neo4j.org/chunked/1.9.5/graph-algo.html ) in neo4j these >> algorithms are implemented: >> >> - Shortest paths >> - all paths >> - all simple paths >> - Dijkstra >> - A* >> >> >> By reading this link >> http://docs.neo4j.org/chunked/1.9.5/rest-api-graph-algos.html I saw that >> REST API allows to call these algorithms: >> >> - Find all shortest paths >> - Find one of the shortest paths between nodes >> - Execute a Dijkstra algorithm with similar weights on relationships >> - Execute a Dijkstra algorithm with weights on relationships >> >> >> The second question is: can't I invoke the A* algorithm by REST API? This >> is related to the fact that I'ld love to have one (ore more) dedicated >> machine to neo4j and access to them by REST API (is this a good solution?) >> >> The last question regards neo4j performance. In my real scenario i may >> import an OSM file of an whole italian region (maybe also the full Italy); >> in the case of one region I can have around 10 millions of nodes (also more >> than 10 million) and some millions of relationship. In this case...what are >> performances with the built-in algorithms Dijkstra and/or A* when i want >> the shortest path (or all paths) between two points located at the end of >> the graph? >> >> Thank you >> Angelo >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Neo4j" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to neo4j+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > -- > You received this message because you are subscribed to the Google Groups > "Neo4j" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to neo4j+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.