Avoid Specific Routes - web_services - Latest

Spectrum Spatial Guide

Product type
Software
Portfolio
Locate
Product family
Spectrumâ„¢ software
Product
Spectrumâ„¢ software > Spatial > Spectrum Spatial
Version
Latest
ft:locale
en-US
Product name
Spectrum Technology Platform
ft:title
Spectrum Spatial Guide
Copyright
2025
First publish date
2007
ft:lastEdition
2026-02-13
ft:lastPublication
2026-02-13T17:17:07.540000
L1_Product_Gateway
Locate
L2_Product_Segment
Location Intelligence
L3_Product_Brand
Precisely Spectrum Spatial
L4_Investment_Segment
LI Enterprise
L5_Product_Group
Enterprise LI
L6_Product_Name
Spectrum Spatial

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>