[OSM-dev] tag osmarender:namedirection necessary?

80n 80n80n at gmail.com
Sun Jan 7 19:43:00 GMT 2007


On 1/7/07, Johann Gail <johann.gail at gmx.de> wrote:
>
> Hi to the osmarender team.
>
> I've just detected the tag osmarender:nameDirection='-1'.
> Is this tag really neccessary?
> I think, the orientation of the naming should be done by the rendering
> tool automatically, in this case osmarender.
> osmarender should compare the lat coordinates of the beginnign of a way
> with the end of a way and then ensure the reading direction from left to
> right.
> If the beginning of a way/segment lays more left then the end, all is
> okay.
> If the beginning lays more right than the end, then the direction is
> wrong and should be reversed, as it is done by the keyword now.
> How do you think about this?



This is not always the case.  For example, with very winding roads.



I've done some programming work an tested it.
> If you enter the lines
>                 <xsl:when test='tag[@k="name_direction"]/@v="-1"
>                     or tag[@k="osmarender:nameDirection"]/@v="-1"
>                     or
> (key("nodeById",key("segmentById",seg[1]/@id)/@from)/@lon >
> key("nodeById",key("segmentById",seg[last()]/@id)/@to)/@lon)'>
> in generateWayPath
> respective
>                 <xsl:when test='tag[@k="name_direction"]/@v="-1"
>                     or tag[@k="osmarender:nameDirection"]/@v="-1"
>                     or (key("nodeById", at from)/@lon >
> key("nodeById", at to)/@lon)'>
> in generateSegmentPath,
>
> then the Direction is always from left to right.
>
>
> --
> _______________________________________________________________________
> Dipl. Ing. (FH) ... Johann Gail (Fröhlicher Hans)
> Fern-Schall ....... 08254/534
> Fax ............... 01212/525142758
> Elektro-Post ...... johann.gail at gmx.de
> Der Weg zu mir .... http://mail.map24.com/johann.gail
>
>
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20070107/2332d08a/attachment.html>


More information about the dev mailing list