Avoid Specific Routes - Spectrum_Routing_for_Big_Data - 3.0

Global Routing SDK Developer Guide

Product type
Software
Portfolio
Locate
Product family
Spectrumâ„¢ software
Product
Spatial Big Data > Routing for Big Data
Version
3.0
ft:locale
en-US
Product name
Routing for Big Data
ft:title
Global Routing SDK Developer Guide
Copyright
2024
First publish date
2007
ft:lastEdition
2024-10-15
ft:lastPublication
2024-10-15T10:39:39.482000

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 example explains the feature with some imaginary 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 example explains the feature with some imaginary 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>