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

Jukka Rahkonen jukka.rahkonen at latuviitta.fi
Sun Oct 14 21:52:47 BST 2012


Jukka Rahkonen kirjoitti:


> OpenJUMP is a good tool for testing what JTS thinks about validity. Set
> Snap to vertises and Prevent edits leading to invalid geometry options on
> from the settings and start digitizing.

After playing a little bit more with OpenJUMP I noticed that it is not so
simple to use as I supposed. Snapping to vertices does not work for the
vertisces of the feature that is under construction. Therefore one must
digitise the vertices first as point features for making the snapping to
work. It is also possible to create invalid multipolygons so that OpenJUMP
does not warn about it with some tools. For example I managed to create
this
MULTIPOLYGON (((52 453, 52 369, 122 392, 111 447, 52 453)), ((2 455, 75
416, 4 347, -18 406, 2 455)))
even the parts are overlapping.

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.

I also notised some more complications with converting OSM polygons and
multipolygons into OGC simple features. Example
http://wiki.openstreetmap.org/wiki/File:Multipolygon_Illustration_8_shape_with_intesection_point.svg
is hard to convert into a valid simple feature if it is drawn as one way
ABCDEBF. 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.

This is ten years old publication and it handles only polygons, not
multipolygons, but it is still amusing reading
http://www.gdmc.nl/publications/2003/Polygons.pdf

-Jukka Rahkonen-




More information about the dev mailing list