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

David Groom reviews at pacific-rim.net
Sun Dec 3 11:49:17 GMT 2006


----- 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?

David 







More information about the talk mailing list