GetRouteData

GetRouteData returns routing segment information for a point or segment ID. When you specify a point, the closest route segments are returned. When you specify a segment ID, the route segment for that segment ID is returned.

Note: Get Route Data is only available as a service (Management Console and SOAP web service). Get Route Data is not available through a stage or REST API. It is also not available through the Java, C++, C, .NET, or COM APIs.

GetRouteData is part of Spectrum Spatial.

Resource URL

http://server:port/soap/GetRouteData

Example

The following shows a SOAP request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:get="http://www.g1.com/services/GetRouteData">
   <soapenv:Header/>
   <soapenv:Body>
      <get:GetRouteDataRequest>
         <get:options>
            <get:DataSetResourceName>US</get:DataSetResourceName>
            <get:CoordinateSystem>epsg:4326</get:CoordinateSystem>
         </get:options>
         <get:rows>
            <get:row>
               <get:RoutingData>
                  <get:RouteDataPoint>
                     <get:Longitude>-74.843</get:Longitude>
                     <get:Lattitude>40.0077</get:Lattitude>
                  </get:RouteDataPoint>
               </get:RoutingData>
            </get:row>
         </get:rows>
      </get:GetRouteDataRequest>
   </soapenv:Body>
</soapenv:Envelope>

This would be the response:

Note: Some of the segment information has been removed from this example to shorten it.
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <GetRouteDataResponse xmlns="http://www.g1.com/services/GetRouteData">
         <rows>
            <row>
               <Segments>
                  <SegmentDetails>
                     <Segment>
                        <RoutingSegmentID>b81740d3:4b3526</RoutingSegmentID>
                        <SegmentData>
                           <PrimaryName>New Jersey Tpke S</PrimaryName>
                           <PrimaryNameLanguage>en</PrimaryNameLanguage>
                           <AlternateNameList>
                              <AlternateName>
                                 <Name>New Jersey Tpke S</Name>
                                 <Language>en</Language>
                              </AlternateName>
                           </AlternateNameList>
                           <SegmentLength>8.397</SegmentLength>
                           <SegmentLengthUnit>Miles</SegmentLengthUnit>
                           <TimeTaken>7.866666666666666</TimeTaken>
                           <TimeUnit>Minutes</TimeUnit>
                           <TurnAngle>0.0</TurnAngle>
                           <TurnAngleUnit>degree</TurnAngleUnit>
                           <CompassDirection/>
                           <speedOfTravel>64.01366022429013</speedOfTravel>
                           <speedOfTravelUnit>Miles/hour</speedOfTravelUnit>
                           <RoadType>primary highway rural</RoadType>
                           <SegmentDirection>from_to</SegmentDirection>
                           <StartJunctionType>Other</StartJunctionType>
                           <EndJunctionType/>
                           <IsRoundabout>false</IsRoundabout>
                           <IsTollRoad>true</IsTollRoad>
                           <PointsInSegment>
                              <RouteDataPoint>
                                 <Longitude>-74.823861</Longitude>
                                 <Lattitude>40.024421</Lattitude>
                              </RouteDataPoint>
                              <RouteDataPoint>
                                 <Longitude>-74.824133</Longitude>
                                 <Lattitude>40.024149</Lattitude>
                              </RouteDataPoint>
							  ...
                           </PointsInSegment>
                        </SegmentData>
                     </Segment>
                  </SegmentDetails>
               </Segments>
            </row>
         </rows>
      </GetRouteDataResponse>
   </soap:Body>
</soap:Envelope>