[OSM-dev] multipolygon relation and non-closed ways

sly (sylvain letuffe) liste at letuffe.org
Sun Oct 14 22:38:27 BST 2012


> By the way, perhaps there could be WKT presentations about what would be
> the simple feature solutions of the examples on page
> http://wiki.openstreetmap.org/wiki/Relation:multipolygon/validity.

Only if OSM multipolygons are still intended to be considered valid if one 
valid OGC WKT representing them exists, else it doesn't matter anymore to know 
the WKT presentation.

Also I probably wont take the time to do it (unless really wanted ?) since WKT 
is really technically oriented and not for the usual contributorx. And for 
developers, in such simple examples, a quick read of the OGC specification 
should give them easily a valid WKT prestentation if it exists.

 
> Example
> http://wiki.openstreetmap.org/wiki/File:Multipolygon_Illustration_8_shape_w
> ith_intesection_point.svg is hard to convert into a valid simple feature if
> it is drawn as one way ABCDEBF. 

It really depends how you are defining "hard" ;-)
Maybe if you intend to code the algorithm from scratch in C yes, but if you 
have access to postgis 2.0 it is as simple as :
SELECT ST_AsText(ST_MakeValid('
POLYGON((-1 -1, -1 0, 1 0, 1 1, 0 1, 0 -1, -1 -1))'
));
http://blog.opengeo.org/2012/03/23/postgis-2-0-new-features-st_makevalid/


> It can be wrongly interpreted as a single
> ring polygon with self-intersection. However, it could be transformed into
> a valid OGC MultiPolygon with two parts ABF and BCDE.
correct.

-- 
sly (sylvain letuffe)



More information about the dev mailing list