Avoid Specific Routes - web_services - 23.1

Spectrum Web Services Guide

Product type
Software
Portfolio
Integrate
Product family
Spectrum
Product
Spectrum > Web Services
Version
23.1
Language
English
Product name
Spectrum Technology Platform
Title
Spectrum Web Services Guide
First publish date
2007
Last updated
2024-10-17
Published on
2024-10-17T00:33:46.811413

Toll Roads

Avoid Toll Roads feature

This feature allows the user to select a route with or without a toll road. This is a String parameter. Avoid is the parameter in which tollroad can be provided as the value in a SOAP request. In this case the resultant route will exclude toll roads while calculating the routes. The following example explains how this parameter is used.

Example with toll road

The following exmaple explains the feature with some imaginery points for a route, which contains the avoid toll road parameter as <v1:Avoid>tollroad</v1:Avoid> in the request.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://www.mapinfo.com/routing/service/v1" xmlns:v11="http://www.mapinfo.com/midev/service/geometries/v1">
   <soapenv:Header/>
   <soapenv:Body>
      <v1:RouteCostMatrixRequest id="?" locale="?">

         <!--Optional:-->
         <v1:DatasetResourceName>${#Project#TollRoad_DB}</v1:DatasetResourceName>
    
         <v1:StartPoints srsName="epsg:4326">

         <!--Zero or more repetitions:-->
            <v11:Point srsName="epsg:4326">
            <v11:Pos>
               <v11:X>12.822214</v11:X>
               <v11:Y>47.282809</v11:Y>
            </v11:Pos>
         </v11:Point>
   </v1:StartPoints>
           
   <v1:EndPoints srsName="epsg:4326">
           <!--Zero or more repetitions:-->
           <v11:Point srsName="epsg:4326">
              <v11:Pos>
                 <v11:X>12.873852</v11:X>
                 <v11:Y>46.871467</v11:Y>
              </v11:Pos>
            </v11:Point<
     </v1:EndPoints>

      <v1:DistanceUnit>Mile</v1:DistanceUnit>
      <v1:TimeUnit>Minute</v1:TimeUnit>
      <v1:ReturnOptimalRoutesOnly>true</v1:ReturnOptimalRoutesOnly>
      <v1:OptimizeBy>distance</v1:OptimizeBy>
      <v1:MajorRoads>false</v1:MajorRoads>
      <v1:ReturnDistance>true</v1:ReturnDistance>
      <v1:ReturnTime>true</v1:ReturnTime>
      <v1:Avoid>tollroad</v1:Avoid>
      <v1:HistoricTrafficTimeBucket>none</v1:HistoricTrafficTimeBucket>
   </v1:RouteCostMatrixRequest>
</soapenv:Body>
</soapenv:Envelope>

Example without toll road

The following exmaple explains the feature with some imaginery points for a route, which does not contain the avoid toll road parameter in the request.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://www.mapinfo.com/routing/service/v1" xmlns:v11="http://www.mapinfo.com/midev/service/geometries/v1">
   <soapenv:Header/>
   <soapenv:Body>
      <v1:RouteCostMatrixRequest id="?" locale="?">

      <!--Optional:-->
      <v1:DatasetResourceName>${#Project#TollRoad_DB}</v1:DatasetResourceName>
      <v1:StartPoints srsName="epsg:4326">
    
          <!--Zero or more repetitions:-->
          <v11:Point srsName="epsg:4326">
             <v11:Pos>
                <v11:X>12.822214</v11:X>
                <v11:Y>47.282809</v11:Y>
             </v11:Pos>
          </v11:Point>
      </v1:StartPoints>
           
      <v1:EndPoints srsName="epsg:4326">
         <!--Zero or more repetitions:-->
         <v11:Point srsName="epsg:4326">
             <v11:Pos>
                  <v11:X>12.873852</v11:X>
                  <v11:Y>46.871467</v11:Y>
              </v11:Pos>
            </v11:Point>
         </v1:EndPoints>

         <v1:DistanceUnit>Mile</v1:DistanceUnit>
         <v1:TimeUnit>Minute</v1:TimeUnit>
         <v1:ReturnOptimalRoutesOnly>true</v1:ReturnOptimalRoutesOnly>
         <v1:OptimizeBy>distance</v1:OptimizeBy>
         <v1:MajorRoads>false</v1:MajorRoads>
         <v1:ReturnDistance>true</v1:ReturnDistance>
         <v1:ReturnTime>true</v1:ReturnTime>
         <v1:HistoricTrafficTimeBucket>none</v1:HistoricTrafficTimeBucket>
      </v1:RouteCostMatrixRequest>
   </soapenv:Body>
</soapenv:Envelope>