Match GPS coordinates to the road network
map_match.match(MapMatchMatchParams**kwargs) -> MapMatchResult
POST/api/v1/map-match
Match GPS coordinates to the road network
Match GPS coordinates to the road network
import os
from plaza import Plaza
client = Plaza(
api_key=os.environ.get("PLAZA_API_KEY"), # This is the default and can be omitted
)
map_match_result = client.map_match.match(
coordinates=[{
"lat": 48.8566,
"lng": 2.3522,
}, {
"lat": 48.857,
"lng": 2.353,
}, {
"lat": 48.8575,
"lng": 2.354,
}],
)
print(map_match_result.features){
"features": [
{
"geometry": {
"coordinates": [
2.3522,
48.8566
],
"type": "Point"
},
"properties": {
"distance_m": 0,
"edge_id": 0,
"matchings_index": 0,
"name": "name",
"original": [
0,
0
],
"waypoint_index": 0
},
"type": "Feature"
}
],
"matchings": [
{
"foo": "bar"
}
],
"type": "FeatureCollection"
}Returns Examples
{
"features": [
{
"geometry": {
"coordinates": [
2.3522,
48.8566
],
"type": "Point"
},
"properties": {
"distance_m": 0,
"edge_id": 0,
"matchings_index": 0,
"name": "name",
"original": [
0,
0
],
"waypoint_index": 0
},
"type": "Feature"
}
],
"matchings": [
{
"foo": "bar"
}
],
"type": "FeatureCollection"
}