<br><br><div class="gmail_quote">2011/1/7 Richard Marsden <span dir="ltr">&lt;<a href="mailto:winwaed@gmail.com">winwaed@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

I&#39;m trying to get pgRouting working with OSM data loaded into PostGIS. 
There&#39;s quite a learning curve as I am trying to work with the route 
data from an entire planet.osm file, and I&#39;m completely new to PostGIS 
&amp; Postgres (but not SQL/databases in general, or the concepts of 
routing and geospatial processing).<br></blockquote><div><br></div><div>You could try with a smaller area first. Cool that it worked with planet.osm</div><div>OSM files for certain countries are available here for example: <a href="http://downloads.cloudmade.com/">http://downloads.cloudmade.com/</a></div>

<div>(You can download files with street network data only)</div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">


<br>
I&#39;ve got the data loaded up into PostGIS with osm2po. I&#39;m running with 
Windows 7 x32 (x64 is available but PostGIS does not support this yet). 
 About to try pgRouting and I find I don&#39;t have it installed (I thought 
I&#39;d installed it earlier). And this is where I find the Windows build is
 expecting Postgres 8.4 , and not the 9.0 I have installed!<br></blockquote><div><br></div><div>There are probably many Windows users in the pgRouting community, but obviously just a few that can build Windows binaries. </div>

<div>So the currently available builds were reported to us from users. It would be nice to find some volunteers, who could maintain the Windows builds.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">


<br>
Is there a Windows build of pgRouting which will work with Postgres 9.0?<br>
Or I do have to uninstall 9.0, re-install with 8.4, and then reload the OSM data?<br>
(I still have the osm2po-produced scripts, but it would still take a day+ to reload it all).<br></blockquote><div><br></div><div>osm2po is independent from pgRouting, so you don&#39;t need to rebuild everything. </div><div>

 </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
 I see that pgRouting only works with node numbers. However I shall have 
start/end points defined by coordinates. I&#39;m still trying to figure the 
database out. Presumably I can use a query to find the closest node to 
each coordinate, although I can only see the link definitions and not 
the node definitions? (or are these implicit in the links?  ie. a link 
has a start node number and a start coordinate).<br></blockquote><div><br></div><div>A-Star and Dijkstra work with node ID&#39;s, Shooting Star with link ID&#39;s.</div><div>You need to find the closest link/node to your start point to get the start/end node/link</div>

<div>Yes, a link has a start node and a end node. </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Has anyone done this with osm2po produced data? What did your SELECT statements look like?<br>
(also does anyone have a sample pgRouting SELECT that works with psm2po-produced tables?)<br></blockquote><div><br></div><div>To make it work the same way as in the tutorial I created a &quot;view&quot;, for example like this:</div>

<div><br></div><div>CREATE VIEW view_ph_topo AS SELECT id AS gid, type_name AS class_id, st_length(geom_way) AS length, osm_name AS name, x1, y1, x2, y2, reverse_cost, cost, km, kmh, priority, source, target, target_angle, osm_id, pid, osm_source_id, osm_target_id, geom_way AS the_geom, geom_source, geom_target, length(transform(geom_way, 900913)) AS meters, length(transform(geom_way, 900913)) AS meters_rc, 0.0::double precision AS to_cost, NULL::text AS rule FROM ph_topo;</div>

<div><br></div><div>Maybe the table layout of osm2po has changed again, so I can&#39;t say it works exactly like this. </div><div>Then you should be able make a query like the ones in the tutorials.</div><div><br></div><div>

Daniel</div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
<br>
Best regards,<br><font color="#888888">
<br>
Richard Marsden
</font><br>_______________________________________________<br>
Pgrouting-users mailing list<br>
<a href="mailto:Pgrouting-users@lists.osgeo.org">Pgrouting-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/pgrouting-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse">Georepublic UG &amp; Georepublic Japan<br>eMail: <a href="mailto:daniel.kastl@georepublic.de" style="color:rgb(66, 99, 171)" target="_blank">daniel.kastl@georepublic.de</a><br>

Web: <a href="http://georepublic.de/" style="color:rgb(66, 99, 171)" target="_blank">http://georepublic.de</a></span><br>