Use Cases > PTV xMapmatch > How to Use matchPositions with the Unified Profile Mechanism (UPM)

How to match GPS tracks using the Unified Profile Mechanism

This code sample illustrates how to use the Unified Profile Mechanism to modify the values of engine parameters via the client application. Please notice that the basic elements are described in the code sample: How to match GPS tracks in principle.

PTV recommends that the deprecated methods are replaced by using matchPositions for future development tasks. The enhancement of attributes is simply applicable without violating the downwards compatibility.

Define the code snippet

The mechanism is entirely documented in the PTV xServer manual (section: About Profile/XMapmatchProfile) according to the XSD. Use the given snippet without adding the parent element! Following attributes are to be modified:

Caution: Changing the values requires expert knowledge. Otherwise, bad or not explainable results occur.

Add code snippet to CallerContext

If the code snippet is incorrect defined following XServiceException (exemplarily) will occur after executing the method: "Could not parse profile. Reason: Error at line 1, column 162: expected end of tag..."

Call matchPositions

The method contains two mandatory arguments as follows:

Plot Results

The matched segments are displayed by the corresponding polyline.

Matched positions

The following table exemplarily illustrates the relevant attributes provided by the matchResult list.

Detailed result list