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: 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 this report) and other routing engines. It then was commented here and here it then was said that footways are not defined on relations at all. And actually, the symbols on the 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?
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.
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?
On tag description pages, multipolygons are treated as areas rather than relations , since the same tags apply to both closed ways and multipolygons. See FAQ.