경로의 통행료를 계산하는 방법 - Amazon Location Service

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

경로의 통행료를 계산하는 방법

CalculateRoutes API를 사용하면 오리진과 목적지 간의 최상의 경로와 드라이버가 쉬는 최상의 기회를 찾을 수 있습니다. 자동차, 트럭, 보행자 및 스쿠터와 같은 이동 모드를 지원합니다. 또한 오리진 및 대상을 포함하여 최대 25개의 중간 지점(경유지)을 지원하며 몇 가지 제약 조건만 있습니다.

잠재적 사용 사례

  • 요금 계산: 경로 계획 중에 요금 비용을 계산할 수 있습니다.

  • 통행료 감사: 여행 후 통행료 비용을 감사할 수 있습니다.

예시

Sample request
{ "Origin": [ 2.234491, 48.815704 ], "Destination": [ 5.11412, 47.260723 ], "TravelMode": "Car", "Tolls": { "AllTransponders": true, "AllVignettes": true } }
Sample response
{ "LegGeometryFormat": "FlexiblePolyline", "Notices": [], "Routes": [ { "Legs": [ { "Geometry": { "Polyline": "Redacted" }, "TravelMode": "Car", "Type": "Vehicle", "VehicleLegDetails": { "AfterTravelSteps": [], "Arrival": { "Place": { "ChargingStation": false, "OriginalPosition": [ 5.11412, 47.2607229 ], "Position": [ 5.1128203, 47.2596356 ] } }, "Departure": { "Place": { "ChargingStation": false, "OriginalPosition": [ 2.234491, 48.8157039 ], "Position": [ 2.2346482, 48.815674 ] } }, "Incidents": [], "Notices": [], "PassThroughWaypoints": [], "Spans": [], "Tolls": [ { "Country": "FRA", "PaymentSites": [ { "Name": "FLEURY-EN-BIERE", "Position": [ 2.53988, 48.42578 ] }, { "Name": "POUILLY-EN-AUXOIS", "Position": [ 4.56112, 47.25244 ] } ], "Rates": [ { "Id": "2d680295-fb0f-45aa-a8ed-79d9f0f9ff9f", "LocalPrice": { "Currency": "EUR", "Estimate": false, "Range": false, "Value": 21.700000762939453 }, "Name": "APRR", "PaymentMethods": [ "Cash", "BankCard", "CreditCard", "Transponder", "TravelCard" ], "Transponders": [ { "SystemName": "BipandGo" }, { "SystemName": "BipandGo" }, { "SystemName": "BipandGo IDVROOM carpoorling" }, { "SystemName": "Cito30" }, { "SystemName": "Easytrip pass" }, { "SystemName": "Liane 30" }, { "SystemName": "Liber-t" }, { "SystemName": "Liber-t mobilitis" }, { "SystemName": "Pass Pont-Pont" }, { "SystemName": "Progressivi'T Maurienne" }, { "SystemName": "TopEurop" }, { "SystemName": "Tunnel Pass+" }, { "SystemName": "Ulys" }, { "SystemName": "Ulys Europe" }, { "SystemName": "Viaduc-t 30" } ] } ], "Systems": [ 0 ] } ], "TollSystems": [ { "Name": "APRR" } ], "TravelSteps": [ { "Distance": 122, "Duration": 21, "ExitNumber": [], "GeometryOffset": 0, "Type": "Depart" }, { "Distance": 32, "Duration": 7, "ExitNumber": [], "GeometryOffset": 7, "TurnStepDetails": { "Intersection": [], "SteeringDirection": "Right", "TurnIntensity": "Typical" }, "Type": "Turn" }, { "Distance": 74, "Duration": 14, "ExitNumber": [], "GeometryOffset": 8, "TurnStepDetails": { "Intersection": [], "SteeringDirection": "Right", "TurnIntensity": "Typical" }, "Type": "Turn" }, { "Distance": 199, "Duration": 33, "ExitNumber": [], "GeometryOffset": 9, "TurnStepDetails": { "Intersection": [], "SteeringDirection": "Right", "TurnIntensity": "Typical" }, "Type": "Turn" }, { "Distance": 21, "Duration": 10, "ExitNumber": [], "GeometryOffset": 17, "TurnStepDetails": { "Intersection": [], "SteeringDirection": "Right", "TurnIntensity": "Typical" }, "Type": "Turn" }, { "Distance": 461, "Duration": 63, "ExitNumber": [], "GeometryOffset": 20, "TurnStepDetails": { "Intersection": [], "SteeringDirection": "Right", "TurnIntensity": "Typical" }, "Type": "Turn" }, { "Distance": 1557, "Duration": 145, "ExitNumber": [], "GeometryOffset": 41, "TurnStepDetails": { "Intersection": [], "SteeringDirection": "Left", "TurnIntensity": "Typical" }, "Type": "Turn" }, { "Distance": 3471, "Duration": 151, "ExitNumber": [], "GeometryOffset": 135, "RoundaboutExitStepDetails": { "Intersection": [], "SteeringDirection": "Right" }, "Type": "RoundaboutExit" }, { "Distance": 9796, "Duration": 430, "ExitNumber": [], "GeometryOffset": 242, "RampStepDetails": { "Intersection": [], "SteeringDirection": "Right" }, "Type": "Ramp" }, { "Distance": 2473, "Duration": 112, "ExitNumber": [], "ExitStepDetails": { "Intersection": [], "SteeringDirection": "Right" }, "GeometryOffset": 582, "Type": "Exit" }, { "Distance": 674, "Duration": 25, "ExitNumber": [], "GeometryOffset": 669, "Type": "Continue" }, { "Distance": 253953, "Duration": 7468, "ExitNumber": [], "GeometryOffset": 679, "Type": "Continue" }, { "Distance": 37379, "Duration": 1192, "ExitNumber": [], "ExitStepDetails": { "Intersection": [], "SteeringDirection": "Right" }, "GeometryOffset": 5701, "Type": "Exit" }, { "Distance": 2021, "Duration": 110, "ExitNumber": [], "GeometryOffset": 6695, "RoundaboutExitStepDetails": { "Intersection": [], "SteeringDirection": "Right" }, "Type": "RoundaboutExit" }, { "Distance": 7380, "Duration": 316, "ExitNumber": [], "GeometryOffset": 6776, "RoundaboutPassStepDetails": { "Intersection": [], "SteeringDirection": "Right" }, "Type": "RoundaboutPass" }, { "Distance": 4253, "Duration": 156, "ExitNumber": [], "GeometryOffset": 6987, "KeepStepDetails": { "Intersection": [], "SteeringDirection": "Left" }, "Type": "Keep" }, { "Distance": 813, "Duration": 54, "ExitNumber": [], "GeometryOffset": 7081, "RampStepDetails": { "Intersection": [], "SteeringDirection": "Right" }, "Type": "Ramp" }, { "Distance": 1909, "Duration": 109, "ExitNumber": [], "GeometryOffset": 7133, "TurnStepDetails": { "Intersection": [], "SteeringDirection": "Left", "TurnIntensity": "Sharp" }, "Type": "Turn" }, { "Distance": 827, "Duration": 47, "ExitNumber": [], "GeometryOffset": 7182, "Type": "Continue" }, { "Distance": 680, "Duration": 41, "ExitNumber": [], "GeometryOffset": 7216, "RoundaboutExitStepDetails": { "Intersection": [], "SteeringDirection": "Right" }, "Type": "RoundaboutExit" }, { "Distance": 224, "Duration": 12, "ExitNumber": [], "GeometryOffset": 7258, "Type": "Continue" }, { "Distance": 25, "Duration": 2, "ExitNumber": [], "GeometryOffset": 7265, "Type": "Continue" }, { "Distance": 748, "Duration": 51, "ExitNumber": [], "GeometryOffset": 7267, "Type": "Continue" }, { "Distance": 656, "Duration": 46, "ExitNumber": [], "GeometryOffset": 7299, "RoundaboutExitStepDetails": { "Intersection": [], "SteeringDirection": "Right" }, "Type": "RoundaboutExit" }, { "Distance": 1119, "Duration": 78, "ExitNumber": [], "GeometryOffset": 7329, "Type": "Continue" }, { "Distance": 432, "Duration": 26, "ExitNumber": [], "GeometryOffset": 7383, "TurnStepDetails": { "Intersection": [], "SteeringDirection": "Right", "TurnIntensity": "Typical" }, "Type": "Turn" }, { "Distance": 1864, "Duration": 100, "ExitNumber": [], "GeometryOffset": 7402, "RoundaboutExitStepDetails": { "Intersection": [], "SteeringDirection": "Right" }, "Type": "RoundaboutExit" }, { "Distance": 1110, "Duration": 93, "ExitNumber": [], "GeometryOffset": 7470, "RoundaboutExitStepDetails": { "Intersection": [], "SteeringDirection": "Right" }, "Type": "RoundaboutExit" }, { "Distance": 232, "Duration": 10, "ExitNumber": [], "GeometryOffset": 7563, "Type": "Continue" }, { "Distance": 642, "Duration": 29, "ExitNumber": [], "GeometryOffset": 7572, "Type": "Continue" }, { "Distance": 357, "Duration": 25, "ExitNumber": [], "GeometryOffset": 7580, "Type": "Continue" }, { "Distance": 63, "Duration": 10, "ExitNumber": [], "GeometryOffset": 7600, "TurnStepDetails": { "Intersection": [], "SteeringDirection": "Right", "TurnIntensity": "Typical" }, "Type": "Turn" }, { "Distance": 2626, "Duration": 411, "ExitNumber": [], "GeometryOffset": 7602, "TurnStepDetails": { "Intersection": [], "SteeringDirection": "Right", "TurnIntensity": "Typical" }, "Type": "Turn" }, { "Distance": 234, "Duration": 37, "ExitNumber": [], "GeometryOffset": 7627, "Type": "Continue" }, { "Distance": 0, "Duration": 0, "ExitNumber": [], "GeometryOffset": 7632, "Type": "Arrive" } ], "TruckRoadTypes": [], "Zones": [] } } ], "MajorRoadLabels": [ { "RouteNumber": { "Language": "fr", "Value": "A6" } } ] } ] }
cURL
curl --request POST \ --url 'https://routes.geo.eu-central-1.amazonaws.com/v2/routes?key=Your_key' \ --header 'Content-Type: application/json' \ --data '{ "Origin": [ 2.234491, 48.815704 ], "Destination": [ 5.11412, 47.260723 ], "TravelMode": "Car", "Tolls": { "AllTransponders": true, "AllVignettes": true } }'
AWS CLI
aws geo-routes calculate-routes --key ${YourKey} \ --origin 13.055211 52.704802 \ --destination 13.551910 52.282705 \ --travel-mode "Car" \ --tolls '{"AllTransponders": true, "AllVignettes": true}'