Hi Bryce,

Nice to see you back.

The OSM data model in Neo4j-Spatial, created by the OSMImporter, is designed
to mimic the complete contents of the XML files provided for OSM. As it is,
this is not ideal for routing because it traces the complete set of nodes
for the ways, while for routing you really want a graph that connects each
waypoint by a single relationship. So, if I were to perform routing on top
of the OSM model, I would actually build an overlap graph that just connects
the waypoints. The current model has a vertex called a 'way', but that is
not a way-point, because it represents the entire way (eg. a street). We
would need to do the following:

   - Identify ways that are streets (as opposed to non-routing types like
   regions, buildings, lakes, etc.)
   - Identify the points that are intersections (way-points)
   - Create a way-point node for these
   - Add relationships between way points if they are connected by streets
   in the OSM model
   - Weight the relationships by the length of the streets
   - Then apply the A* algorithm (which I have no experience with myself,
   but others in neo4j certainly do)

I think everything but the last part would be very easy to add to the
OSMImporter itself, so that the routing graph exists in any OSM model. Today
it does not exist, and routing would be more difficult and expensive (since
you would have to traverse a much more complex graph, unnecessarily).

Regards, Craig

On Tue, May 31, 2011 at 4:31 AM, bryce hendrix <brycehend...@gmail.com>wrote:

> I am finally getting back to experimenting with Neo4j. Because it has been
> a
> while since I last looked at it, I've forgotten just about everything. I
> want to start with something simple, is there any sample code which does A*
> path finding over OSM ways?
>
> Thanks,
> Bryce
> _______________________________________________
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to