[OSM-talk] talk Digest, Vol 26, Issue 47

David Earl david at frankieandshadow.com
Thu Oct 19 17:09:04 BST 2006


> -----Original Message-----
> From: talk-bounces at openstreetmap.org
> [mailto:talk-bounces at openstreetmap.org]On Behalf Of Dutch
> Sent: 19 October 2006 16:52
> To: talk at openstreetmap.org
> Subject: Re: [OSM-talk] talk Digest, Vol 26, Issue 47
>
>
> 2006/10/19, Ed Davies <osm at edavies.nildram.co.uk>:
> Thomas Walraet wrote:
> > Could we agree in a "normal direction" even if osmarender doesn't need
> > it at the moment ?
> > i.e. : A closed area should be clockwise.
> >
> > If all areas respect these constrain, it will allow correct rendering
> > even with partial areas.
>
> Good suggestion.  Quite a lot of GIS and graphic software has this
> sort of convention.  It does help a lot for partial areas and also
> for making holes in the middle of areas.  E.g., with a clockwise
> convention you know to always shade to the right of the line, even
> when it's the outside of the area.  If your background shading is
> land then sea (or lake) round an island is represented by an
> anticlockwise coastline.
>
> Ed.
>
> Problem is that OSM doesn't have any convention that people have
> to stick to. There are only recommendations, such as those stated
> on the map features page on the Wiki, but there is no convention
> that people must adhere to, in order for their data to be
> included in the OSM database.
>
> This is both good, as in keeping the system open and as close to
> the "wiki" nature as possible, and bad, as in making it hard to
> consistently render maps from the OSM database for areas
> comprising data processed by different people.
>
> One of the things that IMHO needs to be adressed sooner or later,
> is whether OSM must define a convention for tagging that is
> mandatory, or to keep the openess of the current tagging.
>
>
> J.D. "Dutch" Schmidt.


I agree. This is known as the "winding rule" in computer graphics. But it
isn't necessary for rendering in general to have the directional winding
rule (though I can't speak to osmarender in particular) so long as you know
some known point is "outside". A point nominally at infinity will do, then
you just count "in", "out", "in", "out" transitions fro rendering purposes
irrespective fo the path direction.

I should perhaps admit to a certain degree of qualification here: I have a
PhD in computer graphics and spent 20 years designing and developing 3d
modelling applications, PostScript and PDF interpreters and graphics
renderers. (I have, however, more recently changed direction and recently
completed a graphic design degree).

PostScript supports both the in-out and directional winding rules.

David





More information about the talk mailing list