Match GPS track points to the road network
Takes an array of GPS points and returns road-matched geometries. Points should be in temporal order for best matching results.
Array of GPS track points (minimum 2 required)
Map matching options
Matched road segments with distances and optional speeding info
Get a simplified/generalized track matching
Convenience method for getting a simplified geometry suitable for display. Higher tolerance values produce simpler geometries with fewer points.
Array of GPS points
Simplification tolerance in meters (default: 50)
Matched segments with simplified geometries
Match GPS track with automatic segment grouping by attribute
Convenience method that automatically assigns attributes to points for segment grouping. Useful for identifying distinct trip legs.
Array of GPS coordinates
Number of points per group (default: 10)
Map matching options
Matched segments grouped by attribute
Match GPS track with speed data for violation detection
Convenience method that enables speeding detection with sensible defaults.
Array of GPS points with speed data
Speed tolerance in km/h (default: 10)
Matched segments with speeding flags
const trackWithSpeed = [
{ coord: { lat: 41.38, lng: 2.17 }, speed: 50 },
{ coord: { lat: 41.39, lng: 2.16 }, speed: 130 } // Possible violation
];
const result = await service.matchWithSpeedingDetection(trackWithSpeed, 10);
const violations = result.segments.filter(s => s.speeding);
logger.info(`Found ${violations.length} speeding segments`);
ProtectedrequestExecutes a generic request to the Cercalia API.
Query parameters for the API request.
Human-readable name for logging and debugging.
OptionalbaseUrl: stringOptional override for the base API URL.
A promise resolving to the parsed API response.
SnapToRoadService - GPS Track Map Matching using Cercalia Geomtrack API
This service matches raw GPS coordinates to the road network, providing "snapped" geometries that follow actual roads. Essential for fleet management, vehicle tracking, and trip analysis applications.
Key Features
Use Cases
Usage Examples
See
https://docs.cercalia.com/docs/cercalia-webservices/geomtrack/