[OSM-talk] Direction of segments in OSM Areas?

80n 80n80n at gmail.com
Sun Dec 3 13:40:46 GMT 2006


On 12/3/06, David Groom <reviews at pacific-rim.net> wrote:
>
> ----- Original Message -----
> From: "Mike Collinson" <mike at ayeltd.biz>
> To: <talk at openstreetmap.org>
> Sent: Sunday, December 03, 2006 9:45 AM
> Subject: [OSM-talk] Direction of segments in OSM Areas?
>
>
> > I'm just testing the waters with mapping and committing areas to OSM.
> >
> > Should segments should be well-behaved, e.g. clockwise and run in the
> > same direction or whether they can be mixed?  For example, I have
> > parks defined by four separate highways.  When I create a new way,
> > some of the segments run in one direction, some in the other
> > depending on which highway they are from.
> >
> > Mike
> > Oz
> >
> Mike
> I too am not sure how areas should best be defined, I posted the following
> to the list on 1 Nov, but it seemed to get lost.
>
> I'd like some advice on tagging areas.  Say for instance there is a park,
> bounded on four sides by roads, each or the roads is one way, and so the
> segments have to be drawn in the following order:
>
> ------>A-------------->B------->
>             ^                       ^
>              |                        |
>              |                        |
>              |                        |
>              |                        |
> ------>C-------------->D------->
>
> The park would be represented by the square with points at nodes, A, B, C
> &
> D.
>
> Ideally I would mark the area as a way consisting of segments A-B, D-B,
> C-D,
> and C-A.
>
> However according to the wiki
>
> http://wiki.openstreetmap.org/index.php/Editing_Standards_and_Conventions#Tagging_Areas
> "ensure that all the segments are drawn in the same direction".
>
> If an area is marked as above then when it is rendered the fill is OK, ie
> all the square is coloured, but the stroke (the line which should border
> the
> square), not only borders the square, but also gets drawn from C-D.
>
> Now I suppose the solution is to put in new nodes close to B, D & C and
> draw
> segments which do all go in the same direction.  But this seems to be
> adding
> in a lot of unnecessary nodes and segments.  My understanding is at some
> stage anyway segments will disappear, and so all these "extra" nodes and
> segments become almost redundant anyway.
>
> Is there any benefit to dropping the stroke rendering from the rules, and
> allowing areas to be defined as above?


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.

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.

80n



David
>
>
>
>
> _______________________________________________
> talk mailing list
> talk at openstreetmap.org
> http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/talk/attachments/20061203/c767df3a/attachment.html>


More information about the talk mailing list