トポロジセグメントにクラスタがある車両
ユーザーストーリー
ユーザーは、住宅地にある多数の目的地を最速で通過する方法を探しています。 2 つの交差点間の道路上にあるwaypointsは、まとめて保持するものとします。
リクエスト
curl -H "Authorization: Bearer TOKEN_HERE" "https://wps.hereapi.com/v8/findsequence2?mode=fastest;car;traffic:disabled;&start=Start;50.116300,8.628638&end=End;50.116300,8.628638&destination1=A;50.117780,8.630247&destination2=B;50.118227,8.630328&destination3=C;50.118357,8.630335&destination4=D;50.117922,8.630277&destination5=E;50.117841,8.631541&destination6=F;50.117783,8.632024&destination7=G;50.117766,8.632335&clustering=topologySegment"
curl "https://wps.hereapi.com/v8/findsequence2?mode=fastest;car;traffic:disabled;&start=Start;50.116300,8.628638&end=End;50.116300,8.628638&destination1=A;50.117780,8.630247&destination2=B;50.118227,8.630328&destination3=C;50.118357,8.630335&destination4=D;50.117922,8.630277&destination5=E;50.117841,8.631541&destination6=F;50.117783,8.632024&destination7=G;50.117766,8.632335&clustering=topologySegment&apikey=APIKEY_HERE"
レスポンス
ここのサービスは、トポロジ セグメントのWaypointsをシーケンスの中にまとめます。。 これは 、レスポンスのwaypoints セクションの属性cluster
によって反映されます。 ID が「 E 」のwaypoints がクラスタに属していないことを確認してください。 トポロジセグメント上の唯一の目的地です。 レスポンス例では、相互接続セクションが短縮されています。
{
"results": [
{
"waypoints": [
{
"id": "Start",
"lat": 50.1163,
"lng": 8.628638,
"sequence": 0,
"estimatedArrival": null,
"estimatedDeparture": null,
"fulfilledConstraints": []
},
{
"id": "C",
"lat": 50.118357,
"lng": 8.630335,
"sequence": 1,
"estimatedArrival": null,
"estimatedDeparture": null,
"fulfilledConstraints": [],
"cluster": 0
},
{
"id": "B",
"lat": 50.118227,
"lng": 8.630328,
"sequence": 2,
"estimatedArrival": null,
"estimatedDeparture": null,
"fulfilledConstraints": [],
"cluster": 0
},
{
"id": "A",
"lat": 50.11778,
"lng": 8.630247,
"sequence": 3,
"estimatedArrival": null,
"estimatedDeparture": null,
"fulfilledConstraints": [],
"cluster": 1
},
{
"id": "D",
"lat": 50.117922,
"lng": 8.630277,
"sequence": 4,
"estimatedArrival": null,
"estimatedDeparture": null,
"fulfilledConstraints": [],
"cluster": 1
},
{
"id": "E",
"lat": 50.117841,
"lng": 8.631541,
"sequence": 5,
"estimatedArrival": null,
"estimatedDeparture": null,
"fulfilledConstraints": []
},
{
"id": "F",
"lat": 50.117783,
"lng": 8.632024,
"sequence": 6,
"estimatedArrival": null,
"estimatedDeparture": null,
"fulfilledConstraints": [],
"cluster": 2
},
{
"id": "G",
"lat": 50.117766,
"lng": 8.632335,
"sequence": 7,
"estimatedArrival": null,
"estimatedDeparture": null,
"fulfilledConstraints": [],
"cluster": 2
},
{
"id": "End",
"lat": 50.1163,
"lng": 8.628638,
"sequence": 8,
"estimatedArrival": "2022-06-01T07:35:24+02:00",
"estimatedDeparture": null,
"fulfilledConstraints": []
}
],
"distance": "1876",
"time": "324",
"interconnections": [
{
"fromWaypoint": "Start",
"toWaypoint": "C",
"distance": 536.0,
"time": 115.0,
"rest": 0.0,
"waiting": 0.0
},
...
],
"description": "Targeted best time; without traffic",
"timeBreakdown":
{
"driving": 324,
"service": 0,
"rest": 0,
"waiting": 0
}
}
],
"processingTimeDesc": "365ms",
"responseCode": "200",
"warnings": null,
"requestId": null
}