[OSM-dev] Polygon inner/outer relation in osm file

Michael Zangl openstreetmap at michael.fam-zangl.net
Tue Aug 23 12:55:16 UTC 2016


Hi,

There is no order for any of the multipolygon members. When I create them,
I try to sort them (outer before inner, then to form circles). JOSM
combines them to form circles for some months now. But there is no
convention.

So it is up to you to match the corresponding outer/inner rings and
find out if the multipolygon is valid.

> http://wiki.openstreetmap.org/wiki/Relation:multipolygon#Valid_Multipolygon_conditions

Michael

Am 23.08.2016 um 09:39 schrieb patrick keshishian:
> Greetings,
> 
> What is the mechanism used, while processing "relation"-s, in
> matching "inner" and "outer"-s of polygons?
> 
> Examining some example data extracts (from geofabrik.de) it looked
> as if an "outer" is followed by its "inner"-s (if any).
> 
> But soon I came across ones like this:
> 
> 	<relation id="3215648" version="4" timestamp="2013-09-23T03:40:40Z"
> changeset="17984334" uid="574654" user="Tom_Holland">
> 		<member type="way" ref="238816359" role="inner"/>
> 		<member type="way" ref="238816361" role="inner"/>
> 		<member type="way" ref="238816360" role="inner"/>
> 		<member type="way" ref="238531062" role="inner"/>
> 		<member type="way" ref="238531051" role="outer"/>
> 		<member type="way" ref="238531048" role="outer"/>
> 		<member type="way" ref="238531066" role="inner"/>
> 		<tag k="type" v="multipolygon"/>
> 	</relation>
> 
> 
> I am really hoping to be missing something obvious, and that the
> import (or render) software does not examine each "inner" against
> each "outer" to determine the association.
> 
> Also hoping this is the appropriate list for this sort of questions.
> 
> --patrick
> 
> [0] http://www.openstreetmap.org/relation/3215648#map=16/19.9202/-155.8783
> 
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/dev
> 




More information about the dev mailing list