Hi Thanks for you edits.
So for overlapping inner polygons the only way to differentiate them is by tagging as far as I can see. >From the link you posted, in case#9 you need to use the role to build the polygons for example: http://postgis.refractions.net/docs/images/st_isvalid09.png Otherwise, looking at the Algorithm page that you mentioned, doesn't the step RA-4 become ambiguous? In this particular case there would be 3 ways that start at one of the nodes where the inner polygon is touching the outer thus several ring possibilities depending on which way is choosen. I was looking also at complete_ring in osmium's builder.hpp, and seems to me that it just chooses the first suitable. The algorithm that I'm using stores the endpoint on a hash to make the rings, so if there's more than two is not possible to have an clear result. Am I missing something here? Pedro. On Sat, Oct 13, 2012 at 9:49 PM, Frederik Ramm <[email protected]> wrote: > Hi, > > > On 13.10.2012 21:35, Pedro Larroy wrote: >> >> Thanks for the link. I have updated the wiki with requirements for >> valid multipolygon relations: >> >> >> http://wiki.openstreetmap.org/wiki/Relation:multipolygon#Valid_Multipolygon_conditions > > > I made a few changes to your list in the Wiki. (Frankly I am surprised that > you thought the list was necessary, as I believed everything to be explained > properly already.) > > First of all, the "role" is not actually required to determine validity, and > I have removed your references of "... belonging to the same role". The > algorithm laid out on the multipolygon page takes care of any valid > multipolygon whatever the role; and algorithms relying on the role are > broken. The use of the inner/outer roles is recommended because it adds > redundancy and will often make it clearer what the mapper intended to do, > but these roles are not a condition for validity. > > Also, the ways in a mutlipolygon relation do not have to form "a closed > chain" (your words) but "one or more closed chains". > > You wrote that inner polygons "should" not overlap with outers; I changed > that to "must" because the polygon is invalid otherwise. > > Also, your rule that no more than two unclosed ways may meet in a point is > not correct in the case of touching inner rings, where any even number of > unclosed ways might touch in one point. > > Bye > Frederik > > -- > Frederik Ramm ## eMail [email protected] ## N49°00'09" E008°23'33" > > > _______________________________________________ > dev mailing list > [email protected] > http://lists.openstreetmap.org/listinfo/dev _______________________________________________ dev mailing list [email protected] http://lists.openstreetmap.org/listinfo/dev

