![]() |
Warning |
|---|---|
|
This web service is deprecated use compact matrix calculation web service instead. |
This web service calculates a route matrix for a series of points and returns a distance matrix. The distance and time computations are based on the actual road network.
{
"url":"https://api.geoconcept.com/EU/GCW/geoconcept-web/api/lbs/matrix/v4.json",
"method": "POST",
"body":
{
"origins": [
{
"x": 6.961438,
"y": 50.932713
},
{
"x": 6.942641,
"y": 50.92259
}
],
"destinations": [
{
"x": 6.973438,
"y": 50.939732
},
{
"x": 7.106549,
"y": 50.879707
}
],
"srs": "WGS84",
"method": "time",
}
}
Input
| parameter | description | optional | default |
|---|---|---|---|
|
srs |
projection (ESPG code such as epsg:4326 or wgs84) |
yes |
|
|
origins |
List of coordinates of points of origin. The longitude and latitude coordinates are separated by the "," character. The pairs of coordinates are separated by the ";" character. |
yes |
|
|
destinations |
List of coordinates of destination points. The latitude and longitude cooordinates are separated by the , character. The pairs of coordinates are separated by the ";" character. |
yes |
|
|
method |
shortest (distance) or fastest (time) route |
yes |
time |
|
exclusions |
List of restriction rules to use, separated by the ; character |
yes |
|
|
startDateTime |
Start date and time (format ISO8601: local time). Example: 2014-01-21T09:00:00.000+01:00 (or 2014-01-21T09:00:00.000%2B01:00) for a start on 21 January 2014, at 9.00am in Paris |
yes |
|
|
snapMethod |
Snap-to-graph method |
yes |
standard |
|
avoidArea |
Forbidden transit zone in WKT format (POLYGON or MULTIPOLYGON) in the requested projection (srs parameter) |
yes |
|
|
configName |
Name of the configuration to use: |
yes |
|
|
computeOptions |
Selection of variables to use in calculations, using semi-colons ; as separators: |
yes |
Output
Matrix (matrixResult)
| parameter | type | min/max | description |
|---|---|---|---|
|
origins |
Array of string |
0/unlimited |
List of the origin positions. Every position is a string of the longitude and latitude coordinates separated by the "," character. |
|
destinations |
Array of string |
0/unlimited |
List of the destination positions. Every position is a string of the longitude and latitude coordinates separated by the "," character. |
|
srs |
string |
0/1 |
projection passed as input (EPSG code such as epsg:4326 or wgs84) |
|
rows |
Array of matrixRow |
0/unlimited |
Matrix line |
Matrix line (matrixRow)
| parameter | type | min/max | description |
|---|---|---|---|
|
cells |
Array of matrixCell |
0/unlimited |
Matrix cell |
Matrix cell (matrixCell)
| parameter | type | min/max | description |
|---|---|---|---|
|
distanceMeters |
double |
1/1 |
Matrix cell distance (in meters) |
|
durationSeconds |
double |
1/1 |
Matrix cell duration (in seconds) |
|
status |
string |
0/1 |
Matrix cell status: |
Case of an itinerary that has been found (matrixResultV3/status is OK)
{
"message": null,
"status": "OK",
"origins": [
"6.961438,50.932713",
"6.942641,50.92259"
],
"destinations": [
"6.973438,50.939732",
"7.106549,50.879707"
],
"srs": "epsg:4326",
"rows": [
{
"cells": [
{
"distanceMeters": 2119.74,
"durationSeconds": 332.65,
"status": "OK"
},
{
"distanceMeters": 14177.7,
"durationSeconds": 1014.98,
"status": "OK"
}
]
},
{
"cells": [
{
"distanceMeters": 3702.02,
"durationSeconds": 559.35,
"status": "OK"
},
{
"distanceMeters": 15231.24,
"durationSeconds": 1181.95,
"status": "OK"
}
]
}
]
}
Case of forgotten origin and destination specification (matrixResult/status is ERROR)
{
"message":"Origins and destinations must be not null",
"status":"ERROR"
}
Case of a faulty type (serviceResult/status is ERROR)
{
"message":"NumberFormatException: For input string: \"ghs5\"",
"status":"ERROR"
}
Case of a snap-to-graph error (matrixResult/status is OK) / (cell/status est KO)
{
"message": null,
"status": "OK",
"origins": [
"6.961438,50.932713",
"50.92259,6.942641"
],
"destinations": [
"6.973438,50.939732",
"7.106549,50.879707"
],
"srs": "epsg:4326",
"rows": [
{
"cells": [
{
"distanceMeters": 2119.74,
"durationSeconds": 332.65,
"status": "OK"
},
{
"distanceMeters": 14177.7,
"durationSeconds": 1014.98,
"status": "OK"
}
]
},
{
"cells": [
{
"distanceMeters": -1,
"durationSeconds": -1,
"status": "KO"
},
{
"distanceMeters": -1,
"durationSeconds": -1,
"status": "KO"
}
]
}
]
}
- 1. How can I perform a toll-free route matrix calculation?
- 2. What are the maximum values allowed by predefined configName?
- 3. What are the exclusions available?
- 4. What are the Hazardous material exclusions?
- 5. What are Speed Patterns? How are they used?
- 6. How do you use heavy goods vehicle attributes?

![[Warning]](images/community/docbook/warning.png)
