[OSM-talk] Segments, ways and order

Nicola Ranaldo ranaldo at unina.it
Mon Jul 16 15:48:21 BST 2007


Segment order is important for many cases, one_way rendering, areas and so on.
But it may be that a segment from node x to node y, for a one_way street, 
should appear as from y to x for one or more areas. Sometimes it's impossible 
to "reuse" the same segments. One solution could be in general create new 
segments with the same nodes id, but if this is admitted it may generate a 
lot of duplicates segments and seems to me a waste of resources in a 
topological model. Another solution could be in reuse an existent segment if 
it has the right order or to create the inverse if it does not match. A third 
solution could be in having software renderers compute the node order for 
areas at runtime with smart algorithms. In this case it will exists only one 
segment from x to y and will be reused for every way containing node x and y 
without care for the order. This maximizes the topological model but may 
create problems in areas with holes.
Renderers seems to be different, as mapnik and t at h do some reorder, while 
osmarender4 does not. This impacts on the model and on users practices.
May be this definitively cleared? how does josm resolve this issue?
Another issue i'd like to understand is if a way is a simple unconnected 
polyline or may split, or return on itself and so on. In this case segments 
reordering appears not so easy to unrerstand.
May someone update http://wiki.openstreetmap.org/index.php/Data_Primitives ?

regards

	Nicola Ranaldo




More information about the talk mailing list