<div>Hi Frederik.</div>
<div>It was an idea to use osm2pgrouting, bus as I know this plugin is for Linux server.</div>
<div>My client is running on a windows server. :-(</div>
<div> </div>
<div>Back to Traveling Salesman. Well I've read osm file to dataset.What should be a next step? Build a graph or map from a dataset? I have no clue what is <em>osmData</em> mentioned in Traveling Salesman example.</div>
<div> </div>
<div><em> FileLoader fl = new FileLoader(new File("C:\\Install\\denmark.osm.highway"));</em></div>
<div><em> MemoryDataSet map = fl.parseOsm();</em></div>
<div><em> LatLon startCoord = new LatLon(12.180064, 55.470843);</em></div>
<div><em> Node startNode = NodeHelper.findNearestNode(osmData, startCoord);</em></div>
<div><em> </em></div>
<div><em> LatLon targetCoord = new LatLon(12.198208, 55.516831);</em></div>
<div><em> Node targetNode = NodeHelper.findNearestNode(osmData, targetCoord);</em></div>
<div><em> </em></div>
<div><em> TurnRestrictedMultiTargetDijkstraRouter router = new TurnRestrictedMultiTargetDijkstraRouter();</em></div>
<div><em> Route theRoute = router.route(map, targetNode, startNode, mySelector);</em></div>
<div> ...</div>
<div> </div>
<div> </div>
<div>2010/6/20 Frederik Ramm <<a href="mailto:frederik@remote.org">frederik@remote.org</a>></div>
<div>></div>
<div>> Oleg,</div>
<div>></div>
<div>> Oleg Demchenko wrote:</div>
<div>>></div>
<div>>> 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).</div>
<div>></div>
<div>> 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 away.</div>
<div>></div>
<div>>> 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 <a href="http://sourceforge.net/apps/mediawiki/travelingsales/index.php?title=TS/Examples">http://sourceforge.net/apps/mediawiki/travelingsales/index.php?title=TS/Examples</a></div>
<div>></div>
<div>> Yes but as far as I know Traveling Salesman does not use the Osmosis schema, it loads .osm files directly.</div>
<div>></div>
<div>> 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.</div>
<div>></div>
<div>> There is also a specialist mailing list called "routing" on the OSM server where people talk about these things.</div>
<div> </div>
<div>Thank you for a good idea. I will try to get an advise from this list.</div>
<div>></div>
<div>> Bye</div>
<div>> Frederik</div>
<div>></div>
<div>> --</div>
<div>> Frederik Ramm ## eMail <a href="mailto:frederik@remote.org">frederik@remote.org</a> ## N49°00'09" E008°23'33"</div>
<div> </div>
<div> </div>
<div> </div>
<div>--</div>
<div>All the best</div>
<div> Oleg Demchenko</div>
<div> </div>