Matrix Partial Response and Warnings - 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

The Matrix request excludes problematic points from the calculation to process the request. Any problematic points are, therefore, excluded from the response.

A response, which contains time and distance between points, also includes a “warnings” section with information about problematic points in the request that were excluded from the calculation. Warnings list the problematic points. Each object in the list contains the error code for that point and an error description.

The warning message is available in REST version 2, SOAP services introduced in version 2020.1 and later, SDK(GRS), and stages introduced in version 2020.1 and later.

Request

Example start points HTTP POST payload.

http://www.precisely.com/rest/Spatial/erm/databases/usroutedatabase.json?
  q=routeCostMatrix&startPoints=-74.015547,40.756962,-73.46565,40.4545,
  epsg:4326&endPoints=-73.47565,40.4645,epsg:4326&version=2

Response

{
 "matrix": [
    {
     "distanceUnit": "m", 
     "distance": 30771.0, 
     "timeUnit": "min",
     "time": 89.93, 
     "startPoint": {
       "type": "Point", 
       "coordinates": [
          -73.46565,
          40.4545
        ]
      },
      "endPoint": {
        "type": "Point", 
        "coordinates": [ 
           -73.47565, 
           40.4645 
         ] 
        } 
       } 
      ], 
      "warnings": [ 
       { 
        "code": 6002, 
        "message": "Path could not be calculated between start point 
          (-74.015547,40.756962,0) and end point (-73.47565,40.4645,0)." 
       } 
      ] 
}