[OSM-dev] tag osmarender:namedirection necessary?

Johann Gail johann.gail at gmx.de
Sun Jan 7 16:31:33 GMT 2007


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?

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






More information about the dev mailing list