GetTravelCostMatrix
GetTravelCostMatrix は、複数の始点と終点の間の移動時間と距離を計算します。GetTravelCostMatrix を使用して、複数の始点から複数の終点の間の最短または最速ルートを検索し、個々のルートの合計時間および距離 (ルート コスト) を算出できます。例えば、4 つの始点 (S1 ~ S4) と 4 つの終点 (E1 ~ E4) を入力した場合、次の図に示すように合計 16 件のルートが返されます。
マトリクス ルーティングは主に、消防署や警察署といった特定のサービスの応答時間および範囲を特定するために使用します。最初の通報から 20 分以内に事故または事件に対応できる人員を 1 人以上配備するといったサービス レベル アグリーメント (SLA) の、正確な保証範囲を提示するために、このような計算が必要になる場合があります。この計算を分析ツールとして使用することにより、救急車、警察官、または消防隊員が、合理的な時間以内に不動産/人物まで駆けつけられる確率に基づいて、保険対象の不動産および人物のリスクを判定できます。
注: Get Travel Cost Matrix は、SOAP Web サービスとしてのみ利用可能です。Get Travel Cost Matrix を、REST を介して利用することはできません。Java、C++、C、.NET、または COM API を介して利用することもできません。
GetTravelCostMatrix は、Enterprise Routing モジュールに含まれています。
リソース URL
http://server:port/soap/GetTravelCostMatrix
例
SOAP リクエストを以下に示します。
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:get="http://www.pb.com/spectrum/services/GetTravelCostMatrix"
xmlns:spec="http://spectrum.pb.com/"
xmlns:get1="http://www.g1.com/services/GetTravelCostMatrix"
xmlns:typ="http://www.g1.com/services/erm/types">
<soapenv:Header/>
<soapenv:Body>
<get:GetTravelCostMatrixRequest>
<get:input_port>
<get:RouteMatrixRequest>
<get:StartPoints>
<get:StartPoint>
<get:Latitude>33.751748</get:Latitude>
<get:Longitude>-84.364014</get:Longitude>
</get:StartPoint>
<get:StartPoint>
<get:Latitude>33.870416</get:Latitude>
<get:Longitude>-78.62915</get:Longitude>
</get:StartPoint>
<get:StartPoint>
<get:Latitude>35.025498</get:Latitude>
<get:Longitude>-80.864868</get:Longitude>
</get:StartPoint>
</get:StartPoints>
<get:EndPoints>
<get:EndPoint>
<get:Latitude>33.664925</get:Latitude>
<get:Longitude>-80.90332</get:Longitude>
</get:EndPoint>
<get:EndPoint>
<get:Latitude>34.40691</get:Latitude>
<get:Longitude>-80.062866</get:Longitude>
</get:EndPoint>
<get:EndPoint>
<get:Latitude>34.921971</get:Latitude>
<get:Longitude>-81.013184</get:Longitude>
</get:EndPoint>
</get:EndPoints>
</get:RouteMatrixRequest>
</get:input_port>
</get:GetTravelCostMatrixRequest>
</soapenv:Body>
</soapenv:Envelope>
応答は次のようになります。
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns5:GetTravelCostMatrixResponse xmlns:ns2="http://spectrum.pb.com/"
xmlns:ns3="http://www.g1.com/services/erm/types"
xmlns:ns4="http://www.g1.com/services/GetTravelCostMatrix"
xmlns:ns5="http://www.pb.com/spectrum/services/GetTravelCostMatrix">
<ns5:output_port>
<ns5:RouteMatrixResponse>
<ns5:TimeUnits>Minutes</ns5:TimeUnits>
<ns5:DistanceUnits>Miles</ns5:DistanceUnits>
<ns5:RouteCosts>
<ns5:RouteCost>
<ns5:StartPointRef>1</ns5:StartPointRef>
<ns5:EndPointRef>1</ns5:EndPointRef>
<ns5:Time>215.82</ns5:Time>
<ns5:Distance>218.441</ns5:Distance>
</ns5:RouteCost>
<ns5:RouteCost>
<ns5:StartPointRef>2</ns5:StartPointRef>
<ns5:EndPointRef>2</ns5:EndPointRef>
<ns5:Time>124.82</ns5:Time>
<ns5:Distance>103.437</ns5:Distance>
</ns5:RouteCost>
<ns5:RouteCost>
<ns5:StartPointRef>3</ns5:StartPointRef>
<ns5:EndPointRef>3</ns5:EndPointRef>
<ns5:Time>22.53</ns5:Time>
<ns5:Distance>15.005</ns5:Distance>
</ns5:RouteCost>
</ns5:RouteCosts>
<ns5:user_fields/>
</ns5:RouteMatrixResponse>
</ns5:output_port>
</ns5:GetTravelCostMatrixResponse>
</soap:Body>
</soap:Envelope>