[OSM-dev] Find a shortest path with OSMOSIS API (Traveling Salesman)
frederik at remote.org
Sun Jun 20 18:33:28 BST 2010
Oleg Demchenko wrote:
> Later on I was advised I did a wrong job, and I should import OSM format
> file to PostgreSQL. It contains ways, nodes and relations between them
> and it is possible to build a graph directly from OSMOSIS file (database).
It is correct that you should use the OSM format directly. Whether you
want to load that into PostgreSQL or not is another question, you could
also load it into memory or process it into a proper routing graph right
> Question is how is build graph in Java and find way between nodes and it
> details? My understanding is Traveling Salesman with Route class should
> help me
Yes but as far as I know Traveling Salesman does not use the Osmosis
schema, it loads .osm files directly.
If you want something out-of-the-box, you can use osm2pgrouting and try
the PostgreSQL "pgrouting" extension on that but it will not be very fast.
There is also a specialist mailing list called "routing" on the OSM
server where people talk about these things.
Frederik Ramm ## eMail frederik at remote.org ## N49°00'09" E008°23'33"
More information about the dev