On 12/3/06, <b class="gmail_sendername">David Groom</b> <<a href="mailto:reviews@pacific-rim.net">reviews@pacific-rim.net</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
----- Original Message -----<br>From: "Mike Collinson" <<a href="mailto:mike@ayeltd.biz">mike@ayeltd.biz</a>><br>To: <<a href="mailto:talk@openstreetmap.org">talk@openstreetmap.org</a>><br>Sent: Sunday, December 03, 2006 9:45 AM
<br>Subject: [OSM-talk] Direction of segments in OSM Areas?<br><br><br>> I'm just testing the waters with mapping and committing areas to OSM.<br>><br>> Should segments should be well-behaved, e.g. clockwise and run in the
<br>> same direction or whether they can be mixed?  For example, I have<br>> parks defined by four separate highways.  When I create a new way,<br>> some of the segments run in one direction, some in the other<br>
> depending on which highway they are from.<br>><br>> Mike<br>> Oz<br>><br>Mike<br>I too am not sure how areas should best be defined, I posted the following<br>to the list on 1 Nov, but it seemed to get lost.
<br><br>I'd like some advice on tagging areas.  Say for instance there is a park,<br>bounded on four sides by roads, each or the roads is one way, and so the<br>segments have to be drawn in the following order:<br><br>------>A-------------->B------->
<br>            ^                       ^<br>             |                        |<br>             |                        |<br>             |                        |<br>             |                        |<br>------>C-------------->D------->
<br><br>The park would be represented by the square with points at nodes, A, B, C &<br>D.<br><br>Ideally I would mark the area as a way consisting of segments A-B, D-B, C-D,<br>and C-A.<br><br>However according to the wiki
<br><a href="http://wiki.openstreetmap.org/index.php/Editing_Standards_and_Conventions#Tagging_Areas">http://wiki.openstreetmap.org/index.php/Editing_Standards_and_Conventions#Tagging_Areas</a><br>"ensure that all the segments are drawn in the same direction".
<br><br>If an area is marked as above then when it is rendered the fill is OK, ie<br>all the square is coloured, but the stroke (the line which should border the<br>square), not only borders the square, but also gets drawn from C-D.
<br><br>Now I suppose the solution is to put in new nodes close to B, D & C and draw<br>segments which do all go in the same direction.  But this seems to be adding<br>in a lot of unnecessary nodes and segments.  My understanding is at some
<br>stage anyway segments will disappear, and so all these "extra" nodes and<br>segments become almost redundant anyway.<br><br>Is there any benefit to dropping the stroke rendering from the rules, and<br>allowing areas to be defined as above?
</blockquote><div><br>In one sense its a limitation of the renderers that requires this.  But most rendering schemes use path direction to determine inside/outsideness.  Typically clockwise is inside and anti-clockwise is outside.  So path direction seems important.
<br><br>The underlying problem is that segments have an implied direction.  The fix for this is to make ways an ordered list of nodes rather than an ordered list of segments.  Sadly this will not be implemented in the upcoming rails work so I think we'll be living with this for a while longer.
<br><br>80n<br><br> </div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">David<br><br><br><br><br>_______________________________________________
<br>talk mailing list<br><a href="mailto:talk@openstreetmap.org">talk@openstreetmap.org</a><br><a href="http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk">http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk
</a><br></blockquote></div><br>