Linking distance crosses river/water

This forum deals with any kind of routing computation whether it is simple A:B-routing, calculation of isochrones, simple matrix computation or nearest search.

Linking distance crosses river/water

Postby julonska » Mon Feb 10, 2020 3:52 pm

Hi there,

during our routing calls (xRoute1) we face situations where the linking distance is crossing rivers which is not ok for us.
Is it possible to avoid this? Reducing the linking radius in the profile won’t solve this because we need such long distances in the country side where we mainly route.

Best regards,
Posts: 8
Joined: Thu Aug 09, 2018 1:37 pm

Re: Linking distance crosses river/water

Postby Bernd Welter » Mon Feb 10, 2020 4:36 pm

Hello Julian,

check the attached images - both dispolay the same geographical rectangle:


only the street layer

The routing engine is not aware of background and town layers. It simply uses the street layrer for it's linking and routing.
So this means we can't distinguish between oceans/rivers, forest, ...

The linking engine tries to locate the closes valid segment to your southern inout coordinate and from it's perspective it is the Bockumer Straße which is - viewing through the perspective of the map image - the one on the other side of the river. This is the reason why it is difficult to give a proper recommendation. But how about this:

If you look at the screenshot you can see that there are many small dirt roads near the input coordinate. These roads are blocked for motorized vehicles. Try to apply your regular routing and implement an iterative approch based on the waypoint's linking distances of the first result:
Enable the second call to use a more flexible handling of the blockings by

  • set the parameter Routing/Course/BasicDataRules/Blockings/@blockedMalus=2500
  • further relevant parameters are isDelivery, isAuthorized, isEmergency : set them to true in combination with Routing/Waypoint/LinkTypeConfiguration/Road/@onlyReachableRoads=false. This will enable Linker and Router to cope with turning restrictions, gates, ...
:!: Such parameter settings usually cause side effects and therefore this procedure is a fallback at your own risk: you have to decide whether this approach makes sense in your customer's scenario.

Best regards,
Bernd Welter
Senior Technical Consultant Developer Components
PTV GROUP - Germany

Bernd at Youtube
User avatar
Bernd Welter
Site Admin
Posts: 1512
Joined: Mon Apr 14, 2014 10:28 am

Return to PTV xRouteServer