Hi Sylvain,<div><br></div><div>Thank you for pointing out this issue!</div><div>I think osm2pgrouting hasn't changed regarding this for long time, so roundabouts and the discouraged use of tag values may have changed in the meanwhile. I think there are many OSM bots these days trying to fix things like this, so could be that osm2pgrouting is now looking for the wrong tag value.</div>
<div><br></div><div>If you are able to improve this and submit a pull request I'm happy to merge it into the main repository.</div><div><br></div><div>Daniel</div><div><br></div><div> <br><br><div class="gmail_quote">
On Tue, Oct 2, 2012 at 1:44 AM, Sylvain Housseman <span dir="ltr"><<a href="mailto:hsylvio@gmail.com" target="_blank">hsylvio@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
Dear all,<br>
<br>
I think that something is wrong with osm2pgrouting:<br>
<br>
The code (Export2DB.cpp, called by osm2pgrouting.cpp) writes : <br>
<br>
if(way->oneway)<br>
row_data += TO_STR(way->length*1000000);<br>
else<br>
row_data += TO_STR(way->length);<br>
<br>
(this row_data will be the reverse_cost value)<br>
but after exporting france.osm I unfortunately observe that this
condition never seems to be met:<br>
<br>
franceRouting=> select count (*) from ways where reverse_cost
<> length; <br>
count <br>
-------<br>
0 <br>
(1 row)<br>
<br>
<br>
So I guess that the condition (way->oneway) is not
appropriated...<br>
Does any version deal with this problem (or did I forget something
when launching osm2pgrouting)?<br>
<br>
Thanks again for these great tools;<br>
HSylvio.<br>
<br>
<br>
BTW, the osm wiki page
(<a href="http://wiki.openstreetmap.org/wiki/Key:oneway" target="_blank">http://wiki.openstreetmap.org/wiki/Key:oneway</a>) explains that<br>
"Some tags (such as <tt style="background-color:#e0e0f0;white-space:pre-wrap" dir="ltr"><a href="http://wiki.openstreetmap.org/wiki/Key:junction" title="Key:junction" target="_blank">junction</a>=<a href="http://wiki.openstreetmap.org/wiki/Tag:junction%3Droundabout" title="Tag:junction=roundabout" target="_blank">roundabout</a></tt>, <tt style="background-color:#e0e0f0;white-space:pre-wrap" dir="ltr"><a href="http://wiki.openstreetmap.org/wiki/Key:highway" title="Key:highway" target="_blank">highway</a>=<a href="http://wiki.openstreetmap.org/wiki/Tag:highway%3Dmotorway" title="Tag:highway=motorway" target="_blank">motorway</a></tt> and others) imply
<tt style="background-color:#e0e0f0;white-space:pre-wrap" dir="ltr"><strong>oneway</strong>=yes</tt>. You don't need to add
a oneway tag<br>
<h2> <span> <small>...</small></span></h2>
<h2><span><small>Values </small></span></h2>
<ul>
<li> <tt style="background-color:#e0e0f0;white-space:pre-wrap" dir="ltr"><strong>oneway</strong>=yes</tt>
(discouraged alternative: "true", "1")
</li>
<li> <tt style="background-color:#e0e0f0;white-space:pre-wrap" dir="ltr"><strong>oneway</strong>=no</tt>
(discouraged alternative: "false", "0")
</li>
<li> <tt style="background-color:#e0e0f0;white-space:pre-wrap" dir="ltr"><strong>oneway</strong>=-1</tt>
(discouraged alternative: "reverse")
</li>
</ul>
"<br>
<br>
I did not understand yet how the XMLParser works, but could the
problem be solved by changing the type of "bool oneway" to a string
or char[?] in the "Way" class?<br>
Best,<br>
HSylvio.<br>
</div>
<br>_______________________________________________<br>
Pgrouting-users mailing list<br>
<a href="mailto:Pgrouting-users@lists.osgeo.org" target="_blank">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"><div><br></div>-- <br><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse">Georepublic UG & 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>
</div>