Snap to Road
Snaps a collection of coordinates to the road network.
POST /maps/geocoder/v1/snap-to-road
[
[-0.071545, 51.515435],
[-0.070001, 51.515149],
[-0.068481, 51.515044]
]
Tip
The coordinates are represented as an array of arrays with the longitude and latitude values.
Note
The maximum number of coordinates that can be snapped in a single request is 100.
Optional arguments:
includeGeometry
: Whether to include geometry information in the response. Defaults tofalse
.tolerance
: The maximum distance in meters from the input coordinates. Defaults to50
.
Response:
{
"data": [
{
"type": "snapped_point",
"context": {
"point": [
-0.071545,
51.515435
],
"snapped": [
-0.07152986184840954,
51.51539347338316
],
"distance": 7.3
},
"properties": {
"lit": "yes",
"ref": "A11",
"name": "Whitechapel High Street",
"lanes": "3",
"oneway": "yes",
"bicycle": "yes",
"highway": "trunk",
"surface": "asphalt",
"maxspeed": "20 mph",
"operator": "Transport for London",
"wikidata": "Q7995778",
"turn:lanes": "through|through|right",
"postal_code": "E1",
"cycleway:left": "separate",
"sidewalk:left": "separate",
"sidewalk:right": "no",
"dual_carriageway": "yes",
"operator:wikidata": "Q682520",
"maxspeed:computed": "32.19"
}
},
{
"type": "snapped_point",
"context": {
"point": [
-0.070001,
51.515149
],
"snapped": [
-0.07000714672222716,
51.515126438735464
],
"distance": 4
},
"properties": {
"lit": "yes",
"ref": "A13",
"name": "Commercial Road",
"lanes": "1",
"oneway": "yes",
"bicycle": "yes",
"highway": "trunk",
"surface": "asphalt",
"maxspeed": "20 mph",
"operator": "Transport for London",
"wikidata": "Q5152522",
"postal_code": "E1",
"sidewalk:left": "separate",
"sidewalk:right": "no",
"dual_carriageway": "yes",
"operator:wikidata": "Q682520",
"maxspeed:computed": "32.19"
}
},
{
"type": "snapped_point",
"context": {
"point": [
-0.068481,
51.515044
],
"snapped": [
-0.06847556431194743,
51.515007599925525
],
"distance": 6.5
},
"properties": {
"lit": "yes",
"ref": "A13",
"name": "Commercial Road",
"lanes": "2",
"oneway": "yes",
"bicycle": "yes",
"highway": "trunk",
"surface": "asphalt",
"maxspeed": "20 mph",
"operator": "Transport for London",
"wikidata": "Q5152522",
"postal_code": "E1",
"sidewalk:left": "separate",
"sidewalk:right": "no",
"dual_carriageway": "yes",
"operator:wikidata": "Q682520",
"maxspeed:computed": "32.19"
}
}
]
}