[pgrouting-dev] [pgrouting-users] osm2pgrouting oneway misreading
Daniel Kastl
daniel at georepublic.de
Mon Oct 1 18:02:46 PDT 2012
Hi Sylvain,
Thank you for pointing out this issue!
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.
If you are able to improve this and submit a pull request I'm happy to
merge it into the main repository.
Daniel
On Tue, Oct 2, 2012 at 1:44 AM, Sylvain Housseman <hsylvio at gmail.com> wrote:
> Dear all,
>
> I think that something is wrong with osm2pgrouting:
>
> The code (Export2DB.cpp, called by osm2pgrouting.cpp) writes :
>
> if(way->oneway)
> row_data += TO_STR(way->length*1000000);
> else
> row_data += TO_STR(way->length);
>
> (this row_data will be the reverse_cost value)
> but after exporting france.osm I unfortunately observe that this condition
> never seems to be met:
>
> franceRouting=> select count (*) from ways where reverse_cost <> length;
> count
> -------
> 0
> (1 row)
>
>
> So I guess that the condition (way->oneway) is not appropriated...
> Does any version deal with this problem (or did I forget something when
> launching osm2pgrouting)?
>
> Thanks again for these great tools;
> HSylvio.
>
>
> BTW, the osm wiki page (http://wiki.openstreetmap.org/wiki/Key:oneway)
> explains that
> "Some tags (such as junction<http://wiki.openstreetmap.org/wiki/Key:junction>
> =roundabout <http://wiki.openstreetmap.org/wiki/Tag:junction%3Droundabout>,
> highway <http://wiki.openstreetmap.org/wiki/Key:highway>=motorway<http://wiki.openstreetmap.org/wiki/Tag:highway%3Dmotorway>and others) imply
> *oneway*=yes. You don't need to add a oneway tag
> ... Values
>
> - *oneway*=yes (discouraged alternative: "true", "1")
> - *oneway*=no (discouraged alternative: "false", "0")
> - *oneway*=-1 (discouraged alternative: "reverse")
>
> "
>
> 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?
> Best,
> HSylvio.
>
> _______________________________________________
> Pgrouting-users mailing list
> Pgrouting-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pgrouting-users
>
>
--
Georepublic UG & Georepublic Japan
eMail: daniel.kastl at georepublic.de
Web: http://georepublic.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pgrouting-dev/attachments/20121002/2828ce5a/attachment.html>
More information about the pgrouting-dev
mailing list