[OSM-dev] OSM Multipolygons invalidity

sly (sylvain letuffe) liste at letuffe.org
Wed May 9 13:13:13 BST 2012


Hi,

I've asked this question on the tagging list, but I guess this wasn't the best 
place to talk about it since it involves a question of convertion ability for 
algorithms to go from OSM's definition of multipolygons (MP) to the OGC 
simple feature MP entity.

I consider the wiki, as a source of information about tagging, to be the main 
ressource of information to answer "Am I allowed to tag a MP this way or not"

To sum it up, the wiki says that a OSM MP should be considered valid if 
"the multipolygon relation can be used to build multipolygons in compliance 
with the OGC Simple Feature standard" (with the known deviation of touching 
inner rings)

However, this is a bit confusing for me because this sentence does say "can be 
used" but I guess with a powerfull algorithm, it is always possible to build 
a OGC MP from any OSM MP (possibly by droping unclosed ways, re-cutting ways, 
etc.) even if ending with a empty OGC MP after droping everything (which is 
valid according to OGC)

My guess is that this sentence implies (without saying it) things like if a 
member way need to be dropped, then it is an invalid MP. 

Is that so ?

Real border case of validity : 
http://wiki.openstreetmap.org/wiki/Talk:Relation:multipolygon#special_case_of_touching_outer_.28or_inner.29_rings_on_one_or_more_points_only

I didn't thought of this case at random but because a well known algorithm 
used around here (osm2pgsql) doesn't manage to build a valid OGC MP from such 
a case.
But I'm not talking about it to blame osm2pgsql but to ask if complexity 
arising from such cases should be considered too much for an algorithm, and 
pushing back the problem to the mapper saying "no, we consider it invalid for 
OSM please don't do it."
-- 
sly
qui suis-je : http://sly.letuffe.org
email perso : sylvain chez letuffe un point org



More information about the dev mailing list