off road

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.
Post Reply
User avatar
brettshaw
Posts: 7
Joined: Tue Mar 21, 2017 2:08 pm

off road

Post by brettshaw »

Currently I am passing a bunch of waypoints to xRoute to get points back to draw a route on a map.

I have come across a scenario when a route has a waypoint which is ‘off road’.
Currently I have no way of evaluating if a coordinate (lat/long) is off or on road as this has never been relevant to our route calculations.

Is there anything in xServer 2 for determining this?
Brett Shaw
Software Developer - Route Optimiser Online
PTV GROUP - United Kingdom
frs
Posts: 6
Joined: Tue Jan 20, 2015 4:00 pm

Re: off road

Post by frs »

In xServer 2 there is a page called "Route Locations, Waypoints and Route Legs" that can be found under "Technical Concepts/Routing" in the dashboard. There, the differences between OnRoadRouteLocation and OffRoadRouteLocation and the corresponding waypoints are discussed.

The main difference is that using an OffRoadRouteLocation the route starts or ends really at the coordinates that are entered and contains the direct distance from the given coordinate to the road network. In contrast, using an OnRoadRouteLocation the route starts or ends not at the given coordinate but on the nearest road. So the difference cannot be determined automatically from the coordinates. Depending on the wanted behavior one of the two different route locations can be used.

For the OnRoadRouteLocation we plan in future an interesting extension that considers not only the nearest road but also other roads in the neighborhood. This is helpful for example if the coordinates are GPS positions of a vehicle driving on a highway with separate lanes. With the current state the nearest lane is often the wrong one and the route starts in the wrong direction. With the extension we'd consider both lanes and use the one which leads to the better route.

Hope this helps a bit to clarify the difference between off and on road route locations.
Frank Schulz
Senior Software Engineer
Logistics Software
PTV GROUP - Germany
User avatar
Bernd Welter
Site Admin
Posts: 2564
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: off road

Post by Bernd Welter »

Hello Brett,

maybe you can describe the usecase more detailed and we can give you more goal optimized response?
(@Thanks to Frank!)

Best regards,
Bernd
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
User avatar
brettshaw
Posts: 7
Joined: Tue Mar 21, 2017 2:08 pm

Re: off road

Post by brettshaw »

ok the scenario will be like this: -

user imports orders with lat/longs in to the system
some of these lat/longs are not accurate, and not guaranteed to be 'on road'

the system sends a list of these lat/longs to xRoute - /services/rs/XRoute/calculateRoute (using xserver 2) to get a route and its points so we can display a trail on a map.
NOTE: we only use this method for displaying a route on a map at the moment.

One of the calulateRoute requirements is to state whether the point is 'OnRoadWayPoint' or 'OffRoadWayPoint'
if we send a point (which we default to OnRoadWayPoint) the process will fail as it finds one of the points as 'OffRoad', which is correct.

problem is we do not have anyway of checking or validating a lat/long to see if it is ON or OFF road, so we cannot check the point before it is pushed to xRoute.
Brett Shaw
Software Developer - Route Optimiser Online
PTV GROUP - United Kingdom
Joost
Posts: 307
Joined: Fri Apr 25, 2014 1:46 pm

Re: off road

Post by Joost »

I do no thick that the fact your coordinate is Off Road is the issue. Coordinates in practice will never be exactly on a road especially if they are coming from a GPS device. Our engine will always try to link to the nearest road found up to 50 km away (configured in the RouteRequest -> requestProfile -> routingProfile -> linking -> maximumDistanceToSegment if you want to use other values).

The difference between OnRoadRouteLocation and OffRoadRouteLocation is NOT if linking the point to a network will succeed, but if the distance from the coordinate to the network should be counted toward the route or not. See the difference in the screenshots.
offroad.JPG
onroad.JPG
I'm not sure what is causing your routing to fail, my best guess is that you are dealing with delivery areas but that would still be a guess. If you can send a sample of a complete request we can check this deeper.
Joost Claessen
Senior Technical Consultant
PTV Benelux
Post Reply