[OSM-dev] Advice sought on polygon-with-hole drawing

Robert (Jamie) Munro rjmunro at arjam.net
Fri Mar 14 10:43:54 GMT 2008

Hash: SHA1

Frederik Ramm wrote:
| Hi,
|> I think we should stick with the evenodd rule. It is not that difficult
|> for users when editing - colour on the right, it is neccesary for
|> coastlines, and there is nothing to gain by making it unneccesary. If
|> some renderers don't need the rule, it's going to be much harder to tell
|> people they are wrong when the draw things the wrong way round.
| The logical consequence of your above statement would be that we
| should drop rendering of simple areas (without holes) unless they're
| drawn clockwise!

Yes. That is what I am saying. 1 simple rule:

*All* areas should be colour on the right (i.e. clockwise)

It's simple, it's validatable (albeit the current JOSM validator get's
it wrong), it means that coastline is not an exception, it makes the
maths simpler. It might even mean that you don't need relationships to
associate inner and outer -  Any system that gets 1 segment of an area
should be able to know which side of that segment the feature is on.

| Also, my idea would allow a way to serve as an "inner" member of one
| multipoly at the same time as as an "outer" member of another; I think
| you couldn't get that with evenodd.

That's really ugly. There should be 2 ways. They can share nodes if that
~ is wanted. If you really want to use only one way, then you could put a
direction=-1 tag or something in the relationship that defines the
tagging for the inner area, but I still don't like that. I think that if
the edge of an area crosses through something you should know what is on
each side of it without having to consider special tags for exceptional

Robert (Jamie) Munro
Version: GnuPG v1.4.6 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


More information about the dev mailing list