Skip to content
This repository was archived by the owner on Mar 1, 2021. It is now read-only.

Commit 16b4671

Browse files
authored
Update api-reference.md
1 parent b187420 commit 16b4671

File tree

1 file changed

+32
-34
lines changed

1 file changed

+32
-34
lines changed

map-matching/api-reference.md

+32-34
Original file line numberDiff line numberDiff line change
@@ -20,40 +20,6 @@ The Map Matching Service is in active development. You can follow the [Mapzen bl
2020

2121
The default logic for the OpenStreetMap tags, keys, and values used when routing are documented on an [OSM wiki page](http://wiki.openstreetmap.org/wiki/OSM_tags_for_routing/Valhalla).
2222

23-
24-
## Criteria For More Accurate Map-Match Results
25-
26-
* GPS accuracy is "good" meaning that there are few obstructions affecting GPS signals, which can be difficult in urban areas.
27-
* Trace point density is within the approximate range of one per second and one per 10 seconds. The greater the range between them, the more chance of inaccurate results.
28-
* Each trace represents one continuous path
29-
* Corresponding match with the OpenStreetMap network
30-
* NOTE: Traces in urban areas will have a negative effect on GPS accuracy
31-
32-
33-
## Improving Map Matching Results
34-
35-
* `turn_penalty_factor` - To penalize turns from one road segment to next. For a pedestrian trace_route, you may see a back-and-forth on side streets for your path. Try increasing the turn penalty factor to 500 to smooth out jittering of points. Note that if GPS accuracy is already good, increasing this will have a negative affect on your results.
36-
* `gps_accuracy` - GPS accuracy in meters.
37-
* `search_radius` - To specify the search radius (in meters) within which to search road candidates for each measurement. The `max_search_radius` is 100 so this can only be increased to 100. Note that performance will decrease the higher the `search_radius`.
38-
39-
*URL*
40-
41-
https://valhalla.mapzen.com/trace_route?api_key=
42-
43-
*POST Body*
44-
```
45-
{"encoded_polyline":"{gmagAp~_nhF[_AZqAjAaB`AkB\\cAZeAPcAHiAKiCQaAUeAe@cA]qAQsACqAF}AIsAg@{@s@i@sAw@i@uANyAPsAv@cAZ_ALqA_@cA_Ai@q@w@[uAm@}AaAqAs@s@m@u@c@oA]mAMiAIkAYqBRyATsANsBKyBAiA?iAFsALuAPsAXaBGgCg@oBKiBf@iBGiBg@oBHqA?{Ai@cA@oAbAgAj@g@j@k@n@q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ZcAd@eAf@q@z@mAVgB[gAq@aAk@s@UkAG{B_@sAW}ASoBMwBSuB]gBq@eBs@eBaAuAaAeAo@{@i@}@e@{@g@{@m@m@y@_@y@[aBk@a@cBFsB[iAaAGoA`@IcC^yA`@}AVkBNwBBmBR_Cr@{CrAyD|@mCf@kBXeB\\eBl@aCf@cBc@sBg@qAUkBe@sBw@eBi@uA{@gAyAc@qAk@[wB@gARqANgAPiAJsAAeAa@mBKmB@uBBwB@oBZoBJkCJkANaCY}Ac@aBa@iBc@iBu@qBu@sBu@sB_AiBcA}AiAqAaAqAeAaA}@]iANgAj@}@dAcAhAeAfAyAfAo@`@k@f@o@f@s@d@o@f@k@h@o@`@s@V_Br@wAv@{An@uAt@qAj@wAl@iAv@gA~@qAbA{A`AcBz@o@^{A`AmAhAo@b@sAxA_@z@]x@a@t@qAxAk@j@qAfAm@b@m@b@kAfAuA~@eAhAcAbAiAr@qA|@gAdAcA`A{@bA_AhAgA|@mAr@qA|@mAlA","shape_match":"map_snap","costing":"pedestrian","trace_options":{"turn_penalty_factor":500},"directions_options":{"units":"miles"}}
46-
```
47-
48-
49-
## Map Matching Service Limitations
50-
51-
* `max_distance` - The maximum input shape distance is 200000.0 meters.
52-
* `max_gps_accuracy` - The maximum input gps accuracy is 100 meters.
53-
* `max_search_radius` - The maximum of the upper bounds of the search radius is 100 meters.
54-
* `max_shape` - The maximum number of input shape points is 16000.
55-
56-
5723
## Map Matching Service Actions:
5824

5925
Our Map Matching Service includes two separate service calls that perform different operations on an input set of latitude, longitude coordinates, depending on your interest: `/trace_route?` or `/trace_attributes?`. It is important to note that all service requests should be *POST* since shape or encoded_polyline can be fairly large.
@@ -313,3 +279,35 @@ Each `admin` may include:
313279
| `state_code` | State code. |
314280
| `state_text` | State name. |
315281

282+
## Criteria For More Accurate Map-Match Results
283+
284+
* GPS accuracy is "good" meaning that there are few obstructions affecting GPS signals, which can be difficult in urban areas.
285+
* Trace point density is within the approximate range of one per second and one per 10 seconds. The greater the range between them, the more chance of inaccurate results.
286+
* Each trace represents one continuous path
287+
* Corresponding match with the OpenStreetMap network
288+
* NOTE: Traces in urban areas will have a negative effect on GPS accuracy
289+
290+
291+
## Improving Map Matching Results
292+
293+
* `turn_penalty_factor` - To penalize turns from one road segment to next. For a pedestrian trace_route, you may see a back-and-forth on side streets for your path. Try increasing the turn penalty factor to 500 to smooth out jittering of points. Note that if GPS accuracy is already good, increasing this will have a negative affect on your results.
294+
* `gps_accuracy` - GPS accuracy in meters.
295+
* `search_radius` - To specify the search radius (in meters) within which to search road candidates for each measurement. The `max_search_radius` is 100 so this can only be increased to 100. Note that performance will decrease the higher the `search_radius`.
296+
297+
*URL*
298+
299+
https://valhalla.mapzen.com/trace_route?api_key=
300+
301+
*POST Body*
302+
```
303+
{"encoded_polyline":"{gmagAp~_nhF[_AZqAjAaB`AkB\\cAZeAPcAHiAKiCQaAUeAe@cA]qAQsACqAF}AIsAg@{@s@i@sAw@i@uANyAPsAv@cAZ_ALqA_@cA_Ai@q@w@[uAm@}AaAqAs@s@m@u@c@oA]mAMiAIkAYqBRyATsANsBKyBAiA?iAFsALuAPsAXaBGgCg@oBKiBf@iBGiBg@oBHqA?{Ai@cA@oAbAgAj@g@j@k@n@q@p@e@n@k@d@}@\\cAFgAIoBg@m@y@[_ASu@K{AHgBP{@@w@Jy@L}@JsAMoAe@kAq@kAk@gAg@y@a@m@g@q@mAo@e@gAc@sAA_AI_BFu@LiALaALaAHoAFiAF{A@yABkAKmAKcAMiBU}AYu@MaBUqBu@{As@iAaAaA_Ao@aAi@s@q@{@{@a@sAi@oAGeAD}@[YiAmA[u@BgBXaBHgAQ}@]s@S]x@_BbC}@lAw@dAs@dAk@dAm@z@s@n@y@p@{@`Ao@z@_@z@u@jA_Af@aANiAAcBPsAl@s@X}@T{@PoAPeAl@{@t@_AbAgAjBk@r@e@~AY~@U~@YhAi@lAo@t@kBb@u@NyAX{@k@MoAi@{@eAx@aArAmBt@_ALgAPiAXkAf@w@j@u@p@_A^aA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`AcBz@o@^{A`AmAhAo@b@sAxA_@z@]x@a@t@qAxAk@j@qAfAm@b@m@b@kAfAuA~@eAhAcAbAiAr@qA|@gAdAcA`A{@bA_AhAgA|@mAr@qA|@mAlA","shape_match":"map_snap","costing":"pedestrian","trace_options":{"turn_penalty_factor":500},"directions_options":{"units":"miles"}}
304+
```
305+
306+
307+
## Map Matching Service Limitations
308+
309+
* `max_distance` - The maximum input shape distance is 200000.0 meters.
310+
* `max_gps_accuracy` - The maximum input gps accuracy is 100 meters.
311+
* `max_search_radius` - The maximum of the upper bounds of the search radius is 100 meters.
312+
* `max_shape` - The maximum number of input shape points is 16000.
313+

0 commit comments

Comments
 (0)