Hi everyone,
I’m currently trying to perform very precise directions-queries with the avoid_polygons parameter. I’m querying routes from different critical infrastructures on both sides of level-crossings. Unfortunately, the endpoint I specify is repeatedly moved to a location I did not intend, in the case shown below even across a blocked road (= railway-track). This happens even though I use endpoints that correspond exactly to points in the OSM network. If I restrict the radius of the endpoint to 10m, no routable point is found:
Could not find routable point within a radius of 10.0 metres of specified coordinate 1: 9.0152919 50.0789229.
What logic is used to search for a routable point? Isn’t every point within the OSM road network routable?
I host a local ORS image in Docker and use an OSM dataset for Germany. The endpoints of the routes I query come from the OSM road network with the same status as the dataset used in Docker. I can therefore say with almost certainty that this point can be found within the road linestring (see Way: Königsberger Straße (46171903) | OpenStreetMap).
The image shows the blocked road section as one of several polygons, as well as the course of the road as a linestring. As the polygon is formed based on the level-crossing that is part of the road network, it should be ensured that the polygon blocks at least one point of the road network. My query endpoints are the corner points of the road linestring.
Queries:
{
"coordinates": [[9.0505175, 50.0876257], [9.0154265, 50.0787722]],
"continue_straight": false,
"options": {
"avoid_polygons": {
"type": "MultiPolygon",
"coordinates": [
[[[9.015349762719822, 50.07887688784149], [9.01554332905168, 50.078978880666305], [9.015553184260508, 50.07897582721316], [9.015550130807368, 50.07896597200433], [9.015356437280179, 50.07886391215851], [9.01516077026376, 50.078765688875365], [9.015150977136996, 50.07876893593331], [9.015154224194943, 50.078778729060076], [9.015349762719822, 50.07887688784149]]],
[[[9.012406754255899, 50.0771408030998], [9.0125869640696, 50.077265017473714], [9.012597111239083, 50.07726315101487], [9.012595244780238, 50.07725300384539], [9.012415045744103, 50.077128796900205], [9.012235069852064, 50.07700426683893], [9.012224919350086, 50.07700611508855], [9.012226767599714, 50.07701626559053], [9.012406754255899, 50.0771408030998]]],
[[[9.003130821784923, 50.07792709586208], [9.003324675974335, 50.07782532785187], [9.003327744416803, 50.07781547729971], [9.003317893864638, 50.07781240885724], [9.003124178215076, 50.07791410413792], [9.002928326262028, 50.07801162180599], [9.002925047280435, 50.078021404290176], [9.002934829764621, 50.07802468327177], [9.003130821784923, 50.07792709586208]]],
[[[9.027307379162197, 50.08510534331047], [9.02750903181854, 50.085190898415], [9.027518597272039, 50.08518703178643], [9.027514730643471, 50.08517746633293], [9.027313420837801, 50.08509205668954], [9.027116730456589, 50.084996488185524], [9.027106980197978, 50.08499986178511], [9.027110353797562, 50.08500961204372], [9.027307379162197, 50.08510534331047]]]
]
}
},
"preference": "fastest",
"radiuses": [10, 10]
}
and with the second endpoint:
"coordinates": [[9.0505175, 50.0876257], [9.0152919, 50.0789229]]
In order to understand the unintended displacement of the endpoint, the radius parameter must be removed as described above.
Is there any way to navigate exactly to the endpoints I have selected without the points being offset? Why can no routable point be found, although the point is definitely accessible despite some polygons being blocked?
Thanks in advance and best regards
Marco