Hi @UliE,
The restrictions are not related to the number of polygons but to their area which can be a maximum of 200.000 square kilometers. (there is another restriction where you can’t pass really thin and long polygons e.g. 0.002 x 100.000.000 km rectangles as this would slow processing down)
It is sufficient to place a small avoid polygon on top of a way segment for it to be avoided.
I think your Multipolygon is not properly formatted.
- make sure to not use these quotes
“coordinates”
but these"coordinates"
- make sure you are passing a correct MultiPolygon. check that you are not accidentally passing a Polygon with an inner ring instead of 2 Polygons.
In you request above you also have each polygon twice.
A body similar to this should work:
{
"elevation": true,
"options": {
"avoid_polygons": {
"type": "MultiPolygon",
"coordinates": [
[
[
[
"8.12265",
"49.37668"
],
[
"8.12344",
"49.37699"
],
[
"8.12649",
"49.37696"
],
[
"8.13202",
"49.37682"
],
[
"8.13651",
"49.37624"
],
[
"8.14037",
"49.37545"
],
[
"8.13981",
"49.3774"
],
[
"8.14430",
"49.37684"
],
[
"8.14597",
"49.37656"
],
[
"8.14825",
"49.37619"
],
[
"8.14644",
"49.37562"
],
[
"8.1428",
"49.37586"
],
[
"8.14657",
"49.37499"
],
[
"8.14640",
"49.37351"
],
[
"8.14387",
"49.37257"
],
[
"8.14140",
"49.37417"
],
[
"8.13245",
"49.37584"
],
[
"8.12383",
"49.37563"
],
[
"8.12282",
"49.37596"
],
[
"8.12265",
"49.37668"
]
]
],
[
[
[
"8.15924",
"49.37481"
],
[
"8.15904",
"49.37531"
],
[
"8.16024",
"49.37560"
],
[
"8.16743",
"49.37532"
],
[
"8.16824",
"49.37494"
],
[
"8.16784",
"49.37440"
],
[
"8.16239",
"49.37449"
],
[
"8.15924",
"49.37481"
]
]
]
]
}
},
"coordinates": [
[
8.1216,
49.375863
],
[
8.148272,
49.376722
]
],
"extra_info": [
"steepness",
"waytype",
"surface"
]
}
Best regards