FR:Multipolygon Examples

From OpenStreetMap Wiki
Jump to navigation Jump to search

Cette page propose des exemples réels des relations de type multipolygone.

Liste de plusieurs exemples pour les mappers : Étape par étape, du plus simple au plus complexe

Dans ce chapitre, un exemple simple est expliqué jusqu'à devenir progressivement un exemple considéré comme complexe.

Nomenclature pour décrire les exemples :
  • Les chemins sont indiqués par des chiffres arabes 1, 2, 3 ....
  • Les chemins non fermés sont marqués par de grands points noirs à leurs extrémités.
  • Les zones sont marquées en majuscules A, B, C, ....
  • Les chiffres et les lettres des figures sont suivis des étiquettes de l'objet (chemin ou zone) pour rendre les indications plus explicites.
  • Uniquement pour l'exemple les balises essentielles sont données
  • Tags which aren't essential for the examples are omitted. E.g. name=*, source=*.
  • Les relations sont décrites dans le texte sous forme de liste, ce qui les rend plus lisibles que la notation technique XML.
  • Les nouveaux membres ajoutés à l'étape actuelle sont marqués en italique
Relation
   Tag pour la Relation
   ...
   Membre de la Relation
  >Nouveau membre de la Relation
   ...
Nomenclature visuelle

Forêt (Un seul chemin fermé)

Le chemin fermé numéro 1 est dessiné et étiqueté avec landuse=forest décrivant la forêt A. Marquer un chemin fermé avec une étiquette indiquant une zone entraîne le dessin d'une zone. Ce type de raccourci fonctionne pour des zones simples dont le contour consiste en un seul chemin et qui n'ont pas de trous. La même chose pourrait être faite avec un multipolygone, mais cela ne ferait que complexifier un cas simple.
Forêt (Un seul chemin fermé)

Forêt ayant un lac (Un lien outer ainsi qu'un lien inner)

Le chemin fermé numéro 2 est ajouté à l'intérieur de la forêt A et étiqueté avec natural=water décrivant le lac B. Le chemin fermé numéro 1 n'est plus balisé car il n'y a pas de caractéristiques cartographiques pour l'ensemble de la zone fermée. Cela ne représente pas réellement quelque chose. La forêt A qui est étiquetée landuse=forest est le lien vert : la zone délimitée par le chemin numéro 1 moins le lac B.

Le multipolygone A décrit le cas.

Relation A:
   type=multipolygon
   landuse=forest
   outer 1
   inner 2
Forêt ayant un lac (Un lien outer ainsi qu'un lien inner)

Forêt ayant deux lacs (Un outer ainsi que deux liens inner)

Le chemin fermé numéro 3 est ajouté dans la forêt A et est étiqueté avec natural=water décrivant le lac C. La forêt A qui comporte l'étiquette landuse=forest n'est donc pas un simple lien. Elle est maintenant la zone délimitée par le chemin 1 moins les lacs B et C.

inner 3 est ajouté au multipolygon A :

Relation A:
   type=multipolygon
   landuse=forest
   outer 1
   inner 2
  >inner 3
Forêt ayant deux lacs (Un outer ainsi que deux liens inner)

Forêt avec deux lacs ainsi qu'une île (Multipolygones imbriqués)

Chemin fermé numéro 4 est ajouté dans le lac B et étiqueté avec natural=scrub décrivant l'île D.

La forêt A et donc le multipolygone A restent inchangés :

Relation A:
   type=multipolygon
   landuse=forest
   outer 1
   inner 2
   inner 3

Le chemin fermé numéro 2, à présent, ne possède plus son étiquette car il n'y a plus d'entités cartographiques pour toute la zone fermée. Lac B est étiqueté avec natural=water et devient le lien bleu : la zone fermée par le chemin 2 moins l'île D.

Ceci est décrit par un second multipolygone B :

Relation B:
   type=multipolygon
   natural=water
   outer 2
   inner 4
Forêt avec deux lacs ainsi qu'une île (multipolygones imbriqués)

Forest with 2 lakes, island, boundary and highway (Multiple ways forming nested multipolygons)

Way 1 used to be the whole boundary of forest A now gets split and partially replaced: The linear ways 5, 6, 7 and 8 are added and tagged with boundary=administrative. Further the linear ways 9, 10 and 11 are added and tagged with highway=unclassified.

Remark: the usage of highways (linear element) as boundaries (multipolygon or not) for landuse (area element) is basically discouraged. This because later shifting, nudging or reshaping the highway or area immediately results in the not often intended change of the connected area resp. highway. More importantly the vast majority of (less technical) mappers cannot be expected to ever grasp advanced multipolygons. Overusing advanced multipolygons like in this example will either prevent those mappers from participating or down the road guarantee the destruction of these multipolygons. Also note that including highways in advanced multipolygons like in this example, vastly complicates later editing of those highways (physical modifications to roads happen all the time). Far from all mappers can be expected to have the skills or time to handle this gracefully.

Way 2 used to be the whole boundary of lake B is also split. The ways 12, 13, 14 and 15 are added and tagged with highway=track. There are own map features for ways 5 to 15 and thus they are tagged with them regardless whether they are members of multipolygons because they aren't areas.

The "remaining" way 1 and the ways 6 and 10 are now forming the boundary of forest A. outer 6, outer 10 and inner 13 are added to multipolygon A:

Relation A:
   type=multipolygon
   landuse=forest
   outer 1
  >outer 6
  >outer 10
   inner 2
  >inner 13
   inner 3

The ways 2 and 13 are forming the boundary of lake B. outer 13 is added to multipolygon B:

Relation B:
   type=multipolygon
   natural=water
   outer 2
  >outer 13
   inner 4
Forest with 2 lakes, island, boundary and highway (Multiple ways forming nested multipolygons)

Remarks:

  • When a highway is chosen as boundary of an area then the roadside and not the (imaginary) center line of the road is the boundary.
  • Some mappers prefer to use ways as boundaries of areas as in this example, some prefer drawing separate lines and some use both depending on the situation.
  • This sequence of examples started with areas. In practise it's more likely to have linear features like highways before areas are added.

Farmland adjacent to forest and farmyard adjacent to lake (Adjacent multipolygons and adjacent inner areas)

The former way 1 gets split again into a new short way 1 and a new way 16 which is tagged with barrier=fence. Way 17 is added and tagged with barrier=fence. Way 18 is added and not tagged. Ways 7, 16, 17 and 18 are forming the boundary of farmland E which is adjacent to forest A. They share the way 16. Closed way 19 is added inside farmland E and tagged with landuse=farmyard describing farmyard G. Closed way 20 is added by using the two northern nodes of way 19 and drawing a duplicate way on top of the northern boundary of farmyard G. Way 20 is tagged with natural=water describing a third lake F.

outer 16 is added to multipolygon A:

Relation A:
   type=multipolygon
   landuse=forest
   outer 1
  >outer 16
   outer 6
   outer 10
   inner 2
   inner 13
   inner 3

Multipolygon B stays unchanged:

Relation B:
   type=multipolygon
   natural=water
   outer 2
   outer 13
   inner 4

Farmland E is described by a new multipolygon E:

Relation E:
   type=multipolygon
   landuse=farmland
   outer 7
   outer 16
   outer 17
   outer 18
   inner 19
   inner 20
Farmland adjacent to forest and farmyard adjacent to lake

Remarks:

  • Duplicate ways, i.e. ways on top of each other, are acceptable, duplicate nodes, i.e. nodes on each other, not.
  • Duplicate ways can be avoided by using multipolygons. But in this example it would just complicate a simple case.

Three separated farmland (Disjunct outer rings)

Way 21 is added and not tagged. Way 22 is added and tagged with barrier=fence. Way 21 and 22 are forming farmland E2 which is separated from but belongs to farmland E.

Way 23 is added and not tagged. Way 24 is added and tagged with barrier=fence. Way 23 and 24 are forming farmland E3 which is separated from but belongs to farmland E. Closed way 25 is added within farmland E3 and tagged with natural=water describing lake H.

Multipolygon A stays unchanged:

Relation A:
   type=multipolygon
   landuse=forest
   outer 1
   outer 16
   outer 6
   outer 10
   inner 2
   inner 13
   inner 3

Multipolygon B stays unchanged:

Relation B:
   type=multipolygon
   natural=water
   outer 2
   outer 13
   inner 4

outer 21, outer 22, outer 23, outer 24 and inner 25 are added to multipolygon E:

Relation E:
   type=multipolygon
   landuse=farmland
   outer 7
   outer 16
   outer 17
   outer 18
   inner 19
   inner 20
  >outer 21
  >outer 22
  >outer 23
  >outer 24
  >inner 25
Three separated farmland (Disjunct outer rings)

Examples for mappers

Meadow with farmland with two forest with scrub (Polygons nested 4 levels)

Rule: When polygons are nested over several levels it's the safest way to

  • tag only the most inner closed ways with tags describing an area and
  • tag the other closed ways only in such a way that no area is described and
  • use multiple multipolygons each describing two adjacent levels.

This example originated from the discussion Verschachtelte Multipolygone in the forum Germany.

Closed ways 1 and 2 enclose areas with holes. Thus multipolygons are needed and the ways aren't tagged. Ways 3 and 4 as well as 5 and 6 are multiple ways enclosing areas. Thus multipolygons are needed. Ways 3 and 6 are tagged with their own map features. Ways 4 and 5 have no map features and thus are untagged. Closed way 7 doesn't have holes and it is tagged with a map feature which describes an area. Thus no multipolygon is needed.

Multipolygon A describes the meadow A, multipolygon B the farmland B, multipolygon C the forest C and multipolygon D the forest D:

Relation A:
   type=multipolygon
   landuse=meadow
   outer 1
   inner 2
Relation B:
   type=multipolygon
   landuse=farmland
   outer 2
   inner 3
   inner 4
   inner 5
   inner 6
Relation C:
   type=multipolygon
   landuse=forest
   outer 3
   outer 4
Relation D:
   type=multipolygon
   landuse=forest
   outer 5
   outer 6
   inner 7
Meadow with farmland with two forest with scrub (Polygons nested 4 levels)

Forest with three wood

This example originated from the discussion Multipolygone, z.B. See oder Gebäude in Waldfläche in the forum Germany. It demonstrates how current deficiencies of the renderers in processing multipolygons can be circumvented while still tagging correctly according to the reality. No Tagging for the renderer.

Theory:

A big forest of mixed wood which has three holes with coniferious, deciduous and mixed wood can be described correctly by Relation A in theory. But the renderers including editor JOSM currently don't process it correctly. Closed ways 1, 2, 3 and 4 are tagged as shown in the figure. Way 1 encloses the whole area.
Relation A:
   type=multipolygon
   landuse=forest
   wood=mixed
   outer 1
   inner 2
   inner 3
   inner 4
Forest with three wood (Theory)

Practice:

The following description is correct too, but uses four multipolygons to circumvent the current deficiencies of the renderers. Way 1 and relation A stay unchanged. The tags of the ways 2, 3 and 4 are moved from the ways to new relations B, C, D.

Relation A:
   type=multipolygon
   landuse=forest
   wood=mixed
   outer 1
   inner 2
   inner 3
   inner 4
Relation B:
   type=multipolygon
   landuse=forest
   wood=coniferious
   outer 2
Relation C:
   type=multipolygon
   landuse=forest
   wood=deciduous
   outer 3
Relation D:
   type=multipolygon
   landuse=forest
   wood=mixed
   outer 4
Forest with three wood (Practice)