Page 1 of 1
off road
Posted: Thu Sep 07, 2017 4:12 pm
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?
Re: off road
Posted: Thu Sep 07, 2017 4:55 pm
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.
Re: off road
Posted: Mon Sep 11, 2017 12:00 pm
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
Re: off road
Posted: Mon Sep 11, 2017 1:47 pm
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.
Re: off road
Posted: Wed Oct 18, 2017 8:29 am
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.
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.