Page 1 of 1

How to enforce xRoute to follow a given GPS track?

Posted: Mon May 28, 2018 8:47 am
by Bernd Welter
Hi there,

believe it or not: I have to calculate some routing KPIs such as toll distance and price for the first time.

The usecase behind this is not a preplanning from A to B but a reporting so we do have a list of more or less detailed number of
  • GPS Coordinates
  • Timestamp
  • Speed
  • Heading
  • EventStatus (e.g. startOfJourney / idling / driving / endOfJourney)
which should be used to reconstruct the route via xMapMatch. The challenges I have (and why I ask for your experience) are:
  • Where is this transformation from input to MapMatch to Routing documented?
  • How can I ensure that xMapMatch considers segment properties in the correct way (e.g. TruckAttributes)? Is sufficient to specify the SNIPPET in the same way as I'm used to in xRoute?
  • Is there any stand still detection available in the workflow? How to deal with that?
  • What xMapMatch output info is needed to feed xRoute's calculateExtendedRoute? Use the matched coordinates as waypoints? Some UniqueGeoIDs as WaypointDesc properties? Or as ExceptionPath?
Best regards,

Bernd

Re: How to enforce xRoute to follow a given GPS track?

Posted: Mon May 28, 2018 12:41 pm
by Joost
Where is this transformation from input to MapMatch to Routing documented?
The current use case documentation fro xMapmatch does not yet focus on passing the result from xMapmatch to xRoute, but it is possible. You can make use of segment ID to make sure that xRoute is using the same segments as xMapmatch. The segment xMapmatch made the match on is always the last segment in the path of the matched location. The segment ID however is not defined as a single attribute, but as a complex class. Therefor it is easy to overlook the possibility in the API. I tend usually explain this by simply providing the following C# source sample:

Code: Select all

public WaypointDesc MatchedLocation_2_WaypointDesc(MatchedLocation matchedLocation)
{
    return new WaypointDesc()
    {
        linkType = LinkType.NEXT_SEGMENT,
        wrappedSegmentID = new UniqueGeoID[]
        {
            new UniqueGeoID()
            {
                iuCode = matchedLocation.wrappedPath.Last().countryCode,
                tID = matchedLocation.wrappedPath.Last().tileId,
                xOff  = matchedLocation.wrappedPath.Last().wrappedStartXYN[0],
                yOff = matchedLocation.wrappedPath.Last().wrappedStartXYN[1],
                n = matchedLocation.wrappedPath.Last().wrappedStartXYN[2],
            },
            new UniqueGeoID()
            {
                iuCode = matchedLocation.wrappedPath.Last().countryCode,
                tID = matchedLocation.wrappedPath.Last().tileId,
                xOff  = matchedLocation.wrappedPath.Last().wrappedEndXYN[0],
                yOff = matchedLocation.wrappedPath.Last().wrappedEndXYN[1],
                n = matchedLocation.wrappedPath.Last().wrappedEndXYN[2],
            },
        }
    };
}
How can I ensure that xMapMatch considers segment properties in the correct way (e.g. TruckAttributes)? Is sufficient to specify the SNIPPET in the same way as I'm used to in xRoute?
xMapmatch can only deal with blocked for car attributes, no other attributes. The only reason the blocked for car attribute is considered is to make it easier to deal with highways which are usually 2 1-one way streets next to each other so we can use the heading effectively to select the correct segment. You do not want to xMapmatch to consider other attributes during matching GPS points. Keep in mind that this use case focuses on where has the truck actually been, not on where is allowed to go.
Is there any stand still detection available in the workflow? How to deal with that?
Yes . If the speed drops below a threshold (default 1.2 meter per second, configurable in the profile with the parameter Mapmatching / GeometricDeviations / @standstillDetectionSpeedThreshold) xmapmatch will only match the first consecutive point of standing still, other consecutive points of standing still are ignored and there will be no output for them.
What xMapMatch output info is needed to feed xRoute's calculateExtendedRoute? Use the matched coordinates as waypoints? Some UniqueGeoIDs as WaypointDesc properties? Or as ExceptionPath
See first question

Re: How to enforce xRoute to follow a given GPS track?

Posted: Mon May 28, 2018 3:10 pm
by Bernd Welter
Hello Joost,

thanks for your detailed description. You mention that the usage of TruckAttributes wouldn't work due to potential restrictions.
Anyway: The purpose of my usecase is to determine toll costs and they are based on truck profiles and therefore I have to apply truck "behaviour" to get proper tarifs.

We'll see,

Best regards,
Bernd