[OSM-dev] multipolygon relation and non-closed ways
Jochen Topf
jochen at remote.org
Mon Oct 15 09:20:19 BST 2012
On Mon, Oct 15, 2012 at 08:03:12AM +0300, Jukka Rahkonen wrote:
> I think that making geometries valid with PostGIS or Spatialite is one
> step too late. Osmium and ogr2ogr and other converters should be able to
> send already valid geometries into PostGIS, GML, shapefiles and what ever.
> Perhaps they already can.
Osmium should already only create valid Multipolygons. (It will drop non-valid
MPs on the floor, not much else to do.) If you find an invalid MP created by
Osmium, thats a bug.
> Perhaps examples B and F could also contain at least two ways? If there is
> only one way, why to make a multipolygon relation at all? But of course it
> is possible to make single way multipolygon relations. I guess that those
> who make converters would like to have all polygon as relations instead of
> the current situation with relations and area=yes polygons and those which
> must be interpreted by the tags like natural=water.
Unfortunately thats the current "state of the art". There are two ways a
polygon can be modelled (closed way and mp relation). And when its a closed
way you have to look at all the tags to decide in a somewhat fuzzy way
whether thats just a closed linestring or a polygon. We do not want to use
mp relations for all those small polygons such as building outlines, that
would be overkill. So until we have something better we have to handle that.
Also see: http://wiki.openstreetmap.org/wiki/The_Future_of_Areas
And something else: Somebody recently started a collection of mp testcases
and put it in a github repository. I forgot where that was but maybe somebody
can dig that up and join in that work.
Jochen
--
Jochen Topf jochen at remote.org http://www.remote.org/jochen/ +49-721-388298
More information about the dev
mailing list