[OSM-talk] multipolygon inners that aren't inside.

charlie at cferrero.net charlie at cferrero.net
Tue Jul 13 07:23:13 BST 2010


John Harvey (john at JohnHarveyPhoto.com) wrote:

> It sure would be nice if users couldn't submit bad data.  Incorrect
> data (wrong street name) takes a human to spot, but bad topology
> (doesn't conform to the rules and a computer can verify conformance)
> shouldn't be possible to submit.  For instance look at this relation:
>
> http://www.openstreetmap.org/browse/relation/542980
>
> Two ways are marked as inners but nothing is inside anything else.  The
> problem is these kinds of errors present a barrier to entry for anyone
> using the OSM data - if you try to write a "by the books" renderer for
> this area you get a spill.  To render it correctly you have to test
> ways marked the inner are actually inside something marked outside.
>
> Mapnik and Osmarender render this area "correctly" so I believe they
> have inside/outside tests.  NoName doesn't render the outers and
> doesn't spill - I believe it detects the error and handles it in a
> different way.  Maplint doesn't appear to catch this error.  If the
> code in those three renderers (which catch this error and handle it two
> different ways) was instead in the submission engine the OSM data would
> be better for it.
>
> A few other examples of the same problem:
>
> 269371 169869 532010 532014 533606 940715 111577 361745 107964 222633
> 554456 541196 302153 188115
>
> (when an inner and outer share an edge point you get the same problem).
>
> John

FWIW, if you process the OSM data with mkgmap you will get warnings  
(and permalinks) for multipolygon errors like these.  It's a handy  
debugging tool.

-- 
Charlie





More information about the talk mailing list