How to map area highways with "hole" in the centre, since area highway defined as relation are not supported?

Ahoj,

how to map (routable) area highways that are not a simple polygon, but have e.g. a hole in the middle, so that a relation is needed?

Example: :arrow_upper_right: This footpath object. It is an area to walk around, but in the middle is something else which is not part of the footpath area.

So it is defined as a relation of two polygons, one “outer” and one “inner”, to create the area with the hole.

I then stumbled upon issues that the area highway defined as a relation is not routed at all (even not at edges) in GraphHopper (see :arrow_upper_right: this report) and other routing engines. It then was commented :arrow_upper_right: here and :arrow_upper_right: here it then was said that footways are not defined on relations at all. And actually, the symbols on the :arrow_upper_right: OSM wiki site about highway=footway seems to confirm that highway=footway is only valid on lines and areas, not relations.

But, how then to correctly map the given example where some enclosed area should not belong to the area highway?

Regards!

In practice, I usually see these types of areas mapped by others as highway=pedestrian + area=yes (for better or worse…)

Since, as you mention, those can be problematic for existing routers (and the multipolygon would further limit its ability to be used) you may consider mapping that area as an area:highway=footway and adding “fallback” highway=footway ways representing the primary travel paths.

1 Like

Yes, but how is the case with the “area with the hole in the middle”? In JOSM, I can draw an area. Without a hole. So I needed to use a relation to add the “hole” in the middle. But a relation is not supported. So, how should I do this then?

From Template:Description - OpenStreetMap Wiki

onRelation: yes if the feature being described is suitable for use on (non-multipolygon) relation elements, no otherwise

In other words - 45px-Osm_element_area.svg + 45px-Osm_element_relation_no.svg means “applies to areas (and multipolygons)”

(Data consumer support is another matter, of course, but the OSM Wiki documents highway=pedestrian as “valid” for multipolygons.

3 Likes

Ehm, ok, now I get confused. Is a “multipolygon” something different than a relation made of individual areas, or at least different than :arrow_upper_right: my object?

So, what is a multipolygon?

Yes, they’re slightly different (but not in your case there)

There’s more information on them here: Relation:multipolygon - OpenStreetMap Wiki - which includes this line:

On tag description pages, multipolygons are treated as areas area rather than relations relation, since the same tags apply to both closed ways and multipolygons. See FAQ.

2 Likes