GetTravelDirections (Legacy)

Important: This stage has been deprecated in the 12.1 release. The Route stage should be used instead when creating new dataflows.

GetTravelDirections returns routing information for a set of two distinct points or for multiple points. It takes a starting latitude and longitude point and an ending latitude and longitude point as input and returns the route that is either fastest or shortest, depending on how you configure the stage.

Each country has its own database, named in this format: Enterprise Routing Module - <Country>. Each database also has its own country code. For example, the name of the Austrian database is "Enterprise Routing Module - Austria," and the Austrian batch country code is "A1T." Each database requires a separate license.

Note: Get Travel Directions is only available as a SOAP web service. Get Travel Directions is not available through REST. It is also not available through the Java, C++, C, .NET, or COM APIs.

GetTravelDirections is part of the Enterprise Routing Module.

Resource URL

http://server:port/soap/GetTravelDirections

Example

The following shows a SOAP request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:get="http://www.pb.com/spectrum/services/GetTravelDirections"
xmlns:typ="http://www.g1.com/services/erm/types">
   <soapenv:Header/>
   <soapenv:Body>
      <get:GetTravelDirectionsRequest>
         <get:input_port>
            <get:PointToPointRequest>
               <get:RoutePoints>
                  <get:RoutePoint>
                     <get:Latitude>33.751748</get:Latitude>                            
                     <get:Longitude>-84.364014</get:Longitude>
                  </get:RoutePoint>
                   <get:RoutePoint>
                     <get:Latitude>33.664925</get:Latitude>
                     <get:Longitude>-80.90332</get:Longitude>
                  </get:RoutePoint>
               </get:RoutePoints>
            </get:PointToPointRequest>
         </get:input_port>
      </get:GetTravelDirectionsRequest>
   </soapenv:Body>
</soapenv:Envelope>

This would be the response:

Note: Some of the directions have been removed from this example to shorten it.
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <ns6:GetTravelDirectionsResponse xmlns:ns2="http://spectrum.pb.com/" xmlns:ns3="http://www.g1.com/services/erm/types" xmlns:ns4="http://www.g1.com/services/GetTravelDirections" xmlns:ns5="http://www.mapinfo.com/midev/service/geometries/v1" xmlns:ns6="http://www.pb.com/spectrum/services/GetTravelDirections">
         <ns6:output_port>
            <ns6:PointToPointResponse>
               <ns6:Time>215.82</ns6:Time>
               <ns6:TimeUnits>Minutes</ns6:TimeUnits>
               <ns6:Distance>218.441</ns6:Distance>
               <ns6:DistanceUnits>Miles</ns6:DistanceUnits>
               <ns6:Format>Normal</ns6:Format>
               <ns6:Language>en</ns6:Language>
               <ns6:RouteDirections>
                  <ns6:RouteDirection>
                     <ns6:Instruction/>
                     <ns6:Time>0.03</ns6:Time>
                     <ns6:TimeUnits>Minutes</ns6:TimeUnits>
                     <ns6:Distance>0.013</ns6:Distance>
                     <ns6:DistanceUnits>Miles</ns6:DistanceUnits>
                  </ns6:RouteDirection>
                  <ns6:RouteDirection>
                     <ns6:Instruction>Turn left on Short St SE and travel South 0.10 mi (0.3 min).</ns6:Instruction>
                     <ns6:Time>0.28</ns6:Time>
                     <ns6:TimeUnits>Minutes</ns6:TimeUnits>
                     <ns6:Distance>0.099</ns6:Distance>
                     <ns6:DistanceUnits>Miles</ns6:DistanceUnits>
                  </ns6:RouteDirection>
                 ...
                  <ns6:RouteDirection>
                     <ns6:Instruction>Turn left on Un-named street and travel East 0.11 mi (0.2 min).</ns6:Instruction>
                     <ns6:Time>0.2</ns6:Time>
                     <ns6:TimeUnits>Minutes</ns6:TimeUnits>
                     <ns6:Distance>0.105</ns6:Distance>
                     <ns6:DistanceUnits>Miles</ns6:DistanceUnits>
                  </ns6:RouteDirection>
                  <ns6:RouteDirection>
                     <ns6:Instruction>Turn right to reach your destination to the East.</ns6:Instruction>
                     <ns6:Time>0.33</ns6:Time>
                     <ns6:TimeUnits>Minutes</ns6:TimeUnits>
                     <ns6:Distance>0.167</ns6:Distance>
                     <ns6:DistanceUnits>Miles</ns6:DistanceUnits>
                  </ns6:RouteDirection>
               </ns6:RouteDirections>
               <ns6:user_fields/>
            </ns6:PointToPointResponse>
         </ns6:output_port>
      </ns6:GetTravelDirectionsResponse>
   </soap:Body>
</soap:Envelope>