Use Cases > PTV xMapmatch > How to Use matchTrack

How to match GPS tracks in principle

This code samples returns a list of attributes per matched location and the results of the complete path holding all matched segments.

Caution: The method is deprecated. Please use matchPositions() with the same result.

Instantiate a PTV xMapmatch client

Add the obligatory url and add the given document style CXF The localhost which should be replaced by the dedicated host name and the default port 50040 were used to define the obligatory URL which is obligatory to broadcast the request respectively the response via Internet.

Defining GPS Track

The devices (e.g. GPS sensors) log the tracks in their specific format. Following parameters are going to be used in this sample:

Defining CallerContext

Please notice that the coordinate format OG_GEODECIMAL is mandatory obtaining your desired result.

Defining Object TrackPosition

Add the obligatory parameters such as id, heading, speed, time stamp, longitude and latitude as described above.

Calling matchTrack

Use the method matchTrack() including the corresponding arguments.

Output

The match result contains following properties:

Discover the API to get experienced with all relevant parameters.

Plot Results

The following graphical depictions exemplarily illustrate the given output.

Result list - Complete Path
Result list - Matched Location (first part)
Result list - Matched Location (second part)