[OSM-talk] talk Digest, Vol 26, Issue 47
80n80n at gmail.com
Thu Oct 19 18:39:48 BST 2006
On 10/19/06, David Earl <david at frankieandshadow.com> wrote:
> > -----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
> 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).
Osmarender uses SVG to do all the real work. The SVG fill mechanism is
described, very concisely, here:
If I am correct it is using the default fill rule; nonzero. Which is, I
think, an implementation of the directional winding rule. However, it would
probably be more intuitive, and easier to use, if the evenodd fill rule
(in-out) were used.
Since all of this is specified by the Osmarender rules file, it would be
true to say that Osmarender supports both winding rules. But the standard
rules file that ships with Osmarender uses the nonzero (directional) rule.
PostScript supports both the in-out and directional winding rules.
> talk mailing list
> talk at openstreetmap.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the talk