(fr) Cette page n’est plus maintenue depuis la version 2022 de Geoconcept Web. Pour accéder à la documentation à jour de ce web service, veuillez suivre ce lien.
The Search Along web service allows you to identify the best candidates from which to select the next nearest step in a pre-existing itinerary.
The algorithm explores all possible solutions before returning the best candidate selected as a function of best score for the requested criteria.
This web service is available at all times with Geoconcept Web and a road graph or network.
Input
parameter | description | optional | default |
---|---|---|---|
routes array of routes/route (inputRoute) |
Table of journey input data. Pre-existing itineraries in which candidate steps must be inserted. |
yes * |
|
routeNodes array of routeNodes/routeNode (inputRouteNode) |
Table of journey input data based on graph nodes (for the fastest calculation). Caution: a physical node does not have the same ID in another graph. |
yes * |
|
resources |
Table of candidates |
yes |
|
method |
Shortest (distance) or fastest (time) route |
yes |
time |
exclusions |
List of restriction rules to use, separated by the ";" character (Example: Toll, Tunnel, Bridge) |
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 |
|
startDateTime |
Departure 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 departure date on 21 Januray 2014, at 9.00am in Paris. Caution: the + character may be misinterpreted by some browsers, and in this instance, you will need to replace it with %2B. |
yes |
|
graphName (depreciated) |
Name of the graph to use |
yes |
|
srs |
projection (EPSG code such as epsg:4326 or wgs84) |
yes |
|
profileId (depreciated) |
Vehicle identifier (saved under vehicle profiles) |
yes |
|
profileName (depreciated) |
Vehicle profile (saved under vehicle profiles) |
yes |
|
configName |
Name of the configuration to use (defined in Geoconcept Web - Administration / Tools / Road graphs) |
yes |
|
computeOptions |
List of options for the calculation,separated by ; characters |
yes |
|
maxDetourDurationSeconds |
Filter: maximum detour authorised (in seconds) |
yes |
|
maxDetourDistanceMeters |
Filter: maximum detour authorised (in metres) |
yes |
|
maxDetourOriginDurationSeconds |
Filter: maximum authorised duration between the journey start point and the candidate (in seconds) |
yes |
|
maxDetourOriginDistanceMeters |
Filter: maximum authorised detour between the candidate and the journey arrival point (in metres) |
yes |
|
maxDetourDestinationDurationSeconds |
Filter: maximum authorised duration between the candidate and the journey arrival point (in seconds) |
yes |
|
maxDetourDestinationDistanceMeters |
Filter: maximum authorised detour from the arrival point (in metres) |
yes |
|
timeOut |
Time out for the calculation (in milliseconds) |
yes |
(*) At least one of the two parameters routes and routeNodes must be assigned a value.
(M18) Available from version M18 and later versions of graphs supplied by GEOCONCEPT SAS.
Journeys in input (inputRoute)
parameter | description | optional | default |
---|---|---|---|
id |
Journey identifier |
No |
|
departurePoint (geographicPoint) |
Coordinates of the journey departure point |
No |
|
arrivalPoint (geographicPoint) |
Coordinates of the journey arrival point |
No |
Coordinates (geographicPoint)
parameter | description | optional | default |
---|---|---|---|
x |
First coordinate or longitude |
No |
|
y |
Second coordonnée or latitude |
No |
Journeys in input based on the graph nodes (inputRouteNode)
parameter | description | optional | default |
---|---|---|---|
id |
Journey identifier |
No |
|
departureNode (geographicPoint) |
Journey departure node |
No |
|
arrivalNode (geographicPoint) |
Journey arrival node |
No |
Candidates (searchAlongResource)
parameter | description | optional | default |
---|---|---|---|
id |
Candidate identifier |
No |
|
x |
First coordinate or longitude |
No |
|
y |
Second coordonnée or latitude |
No |
|
node |
Candidate node |
Yes |
|
priority1 |
Priority 1 |
Yes |
0 |
priority2 |
Priority 2 |
Yes |
0 |
Output
parameter | type | min/max | description |
---|---|---|---|
routes |
array of routes/route (searchAlongRouteResult) |
0/unlimited |
List of calculated journeys. |
List of calculated journeys (searchAlongRouteResult)
parameter | type | min/max | description |
---|---|---|---|
id |
string |
0/1 |
Journey identifier |
directDistanceMeters |
double |
1/1 |
Total distance without detour (in metres) |
directDurationSeconds |
double |
1/1 |
Total duration without detour (in seconds) |
resources |
(searchAlongResourceResult) |
0/unlimited |
List of candidates |
Candidates (searchAlongResourceResult)
parameter | type | min/max | description |
---|---|---|---|
id |
string |
0/1 |
Candidate identifier |
totalDistanceMeters |
double |
1/1 |
Total distance with detour (in metres) |
totalDurationSeconds |
double |
1/1 |
Total duration with detour (in seconds) |
detourDistanceMeters |
double |
1/1 |
Detour distance (in metres) |
detourDurationSeconds |
double |
1/1 |
Detour duration (in seconds) |
detourOriginDistanceMeters |
double |
1/1 |
Detour distance from the journey departure point to the candidate (in metres) |
detourOriginDurationSeconds |
double |
1/1 |
Detour duration from the journey departure point to the candidate (in seconds) |
detourDestinationDistanceMeters |
double |
1/1 |
Detour distance from the candidate to the arrival point (in metres) |
detourDestinationDurationSeconds |
double |
1/1 |
Detour duration from the candidate to the arrival point (in seconds) |
WSDL
http://<server>
/<webapp>
/api/ws/searchAlongService?wsdl
Query
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sch="http://geoconcept.com/gc/schemas"> <soapenv:Header /> <soapenv:Body> <sch:searchAlongV1> <!--Optional:--> <request> <routes> <route> <id>dep</id> <departurePoint> <x>-1.553927</x> <y>47.21858</y> </departurePoint> <arrivalPoint> <x>-1.593927</x> <y>47.18858</y> </arrivalPoint> </route> </routes> <resources> <resource> <id>res1</id> <node /> <priority1>1</priority1> <priority2>2</priority2> <x>-1.511092</x> <y>47.208355</y> </resource> <resource> <id>res2</id> <node /> <priority1>1</priority1> <priority2>1</priority2> <x>-1.549524</x> <y>47.195484</y> </resource> </resources> <srs>epsg:4326</srs> <maxDetourDestinationDistanceMeters>-1</maxDetourDestinationDistanceMeters> <maxDetourDestinationDurationSeconds>-1</maxDetourDestinationDurationSeconds> <maxDetourDistanceMeters>-1</maxDetourDistanceMeters> <maxDetourDurationSeconds>-1</maxDetourDurationSeconds> <maxDetourOriginDistanceMeters>-1</maxDetourOriginDistanceMeters> <maxDetourOriginDurationSeconds>-1</maxDetourOriginDurationSeconds> <method>time</method> <timeOut></timeOut> </request> </sch:searchAlongV1> </soapenv:Body> </soapenv:Envelope>
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns2:searchAlongV1Response xmlns:ns2="http://geoconcept.com/gc/schemas"> <SearchAlongResult> <status>OK</status> <routes> <route> <id>dep</id> <directDistanceMeters>6850.71</directDistanceMeters> <directDurationSeconds>973.14</directDurationSeconds> <resources> <id>res2</id> <totalDistanceMeters>7808.36</totalDistanceMeters> <totalDurationSeconds>1197.28</totalDurationSeconds> <detourDistanceMeters>957.65</detourDistanceMeters> <detourDurationSeconds>224.14</detourDurationSeconds> <detourOriginDistanceMeters>3684.98</detourOriginDistanceMeters> <detourOriginDurationSeconds>752.34</detourOriginDurationSeconds> <detourDestinationDistanceMeters>4123.38</detourDestinationDistanceMeters> <detourDestinationDurationSeconds>444.94</detourDestinationDurationSeconds> </resources> <resources> <id>res1</id> <totalDistanceMeters>13714.6</totalDistanceMeters> <totalDurationSeconds>2261.52</totalDurationSeconds> <detourDistanceMeters>6863.89</detourDistanceMeters> <detourDurationSeconds>1288.38</detourDurationSeconds> <detourOriginDistanceMeters>5731.27</detourOriginDistanceMeters> <detourOriginDurationSeconds>1156.94</detourOriginDurationSeconds> <detourDestinationDistanceMeters>7983.33</detourDestinationDistanceMeters> <detourDestinationDurationSeconds>1104.58</detourDestinationDurationSeconds> </resources> </route> </routes> <computationTime>118.72</computationTime> </SearchAlongResult> </ns2:searchAlongV1Response> </soap:Body> </soap:Envelope>
Query
Query
http://<server>/<webapp>/api/lbs/searchAlong.json
Data (JSON)
{ "routes":[ { "id":"dep", "departurePoint":{ "x":-1.553927, "y":47.218580 }, "arrivalPoint":{ "x":-1.593927, "y":47.188580 } } ], "resources":[ { "id":"res1", "node":"", "priority1":1, "priority2":2, "x":-1.511092, "y":47.208354 } ], "resources":[ { "id":"res2", "node":"", "priority1":1, "priority2":1, "x":-1.549524, "y":47.195483 } ], "method":"time", "srs":"epsg:4326", "maxDetourDurationSeconds":-1, "maxDetourDistanceMeters":-1, "maxDetourOriginDurationSeconds":-1, "maxDetourOriginDistanceMeters":-1, "maxDetourDestinationDurationSeconds":-1, "maxDetourDestinationDistanceMeters":-1 }
Response
The response is always in UTF-8 format.
JSON format
{ "message": null, "status": "OK", "routes": [ { "id": "dep", "directDistanceMeters": 6850.71, "directDurationSeconds": 973.14, "resources": [ { "id": "res2", "totalDistanceMeters": 7808.36, "totalDurationSeconds": 1197.28, "detourDistanceMeters": 957.65, "detourDurationSeconds": 224.14, "detourOriginDistanceMeters": 3684.98, "detourOriginDurationSeconds": 752.34, "detourDestinationDistanceMeters": 4123.38, "detourDestinationDurationSeconds": 444.94 } ] } ] }
Query
Query
http://<server>/<webapp>/api/lbs/searchAlong.xml
Data (XML)
<?xml version="1.0" encoding="UTF-8"?> <searchAlongRequest> <routes> <route> <id>dep</id> <departurePoint> <x>-1.553927</x> <y>47.21858</y> </departurePoint> <arrivalPoint> <x>-1.593927</x> <y>47.18858</y> </arrivalPoint> </route> </routes> <resources> <resource> <id>res1</id> <node /> <priority1>1</priority1> <priority2>2</priority2> <x>-1.511092</x> <y>47.208355</y> </resource> <resource> <id>res2</id> <node /> <priority1>1</priority1> <priority2>1</priority2> <x>-1.549524</x> <y>47.195484</y> </resource> </resources> <srs>epsg:4326</srs> <maxDetourDestinationDistanceMeters>-1</maxDetourDestinationDistanceMeters> <maxDetourDestinationDurationSeconds>-1</maxDetourDestinationDurationSeconds> <maxDetourDistanceMeters>-1</maxDetourDistanceMeters> <maxDetourDurationSeconds>-1</maxDetourDurationSeconds> <maxDetourOriginDistanceMeters>-1</maxDetourOriginDistanceMeters> <maxDetourOriginDurationSeconds>-1</maxDetourOriginDurationSeconds> <method>time</method> </searchAlongRequest>
Response
The response is always in UTF-8 format.
XML format
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <searchAlongResult> <status>OK</status> <routes> <route> <id>dep</id> <directDistanceMeters>6850.71</directDistanceMeters> <directDurationSeconds>973.14</directDurationSeconds> <resources> <id>res2</id> <totalDistanceMeters>7808.36</totalDistanceMeters> <totalDurationSeconds>1197.28</totalDurationSeconds> <detourDistanceMeters>957.65</detourDistanceMeters> <detourDurationSeconds>224.14</detourDurationSeconds> <detourOriginDistanceMeters>3684.98</detourOriginDistanceMeters> <detourOriginDurationSeconds>752.34</detourOriginDurationSeconds> <detourDestinationDistanceMeters>4123.38</detourDestinationDistanceMeters> <detourDestinationDurationSeconds>444.94</detourDestinationDurationSeconds> </resources> <resources> <id>res1</id> <totalDistanceMeters>13714.6</totalDistanceMeters> <totalDurationSeconds>2261.52</totalDurationSeconds> <detourDistanceMeters>6863.89</detourDistanceMeters> <detourDurationSeconds>1288.38</detourDurationSeconds> <detourOriginDistanceMeters>5731.27</detourOriginDistanceMeters> <detourOriginDurationSeconds>1156.94</detourOriginDurationSeconds> <detourDestinationDistanceMeters>7983.33</detourDestinationDistanceMeters> <detourDestinationDurationSeconds>1104.58</detourDestinationDurationSeconds> </resources> </route> </routes> </searchAlongResult>
Case of a search around found (searchAlongResult/status is OK)
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <searchAlongResult> <status>OK</status> <routes> <route> <id>dep</id> <directDistanceMeters>6850.71</directDistanceMeters> <directDurationSeconds>973.14</directDurationSeconds> <resources> <id>res2</id> <totalDistanceMeters>7808.36</totalDistanceMeters> <totalDurationSeconds>1197.28</totalDurationSeconds> <detourDistanceMeters>957.65</detourDistanceMeters> <detourDurationSeconds>224.14</detourDurationSeconds> <detourOriginDistanceMeters>3684.98</detourOriginDistanceMeters> <detourOriginDurationSeconds>752.34</detourOriginDurationSeconds> <detourDestinationDistanceMeters>4123.38</detourDestinationDistanceMeters> <detourDestinationDurationSeconds>444.94</detourDestinationDurationSeconds> </resources> <resources> <id>res1</id> <totalDistanceMeters>13714.6</totalDistanceMeters> <totalDurationSeconds>2261.52</totalDurationSeconds> <detourDistanceMeters>6863.89</detourDistanceMeters> <detourDurationSeconds>1288.38</detourDurationSeconds> <detourOriginDistanceMeters>5731.27</detourOriginDistanceMeters> <detourOriginDurationSeconds>1156.94</detourOriginDurationSeconds> <detourDestinationDistanceMeters>7983.33</detourDestinationDistanceMeters> <detourDestinationDurationSeconds>1104.58</detourDestinationDurationSeconds> </resources> </route> </routes> </searchAlongResult>
Case of an incorrect SRS
{"message":"NullPointerException: null","status":"ERROR"}
Case of an absent resource (searchAroundResponse/status is OK)
{"message":"Input resources list must not be null and empty!","status":"ERROR","routes":[]}
- 1. Is it possible to give priority to either journey time or distance?
- 2. Can I use aliases instead of .siti file names to call a datasource?
- 3. How can I use route statistics?
- 4. How is the classification of returned addresses structured, in relation to distance, time and priorities generally?
- 5. What format should the priority take and is it possible to define a classification order? (increasing/decreasing)
- 6. If just one address in the list has a priority of 0, is the priority taken into account for any or all of the addresses in the list?
- 7. How can I perform a route calculation excluding toll roads?
- 8. What are Speed Patterns? How can I use them?
To use them, you need to pass to parameter, when calling the web service, the computeOptions
parameter with the speedPattern option and specify the value of the Speed Pattern requested, without forgetting a vehicle profile
Example:
+
&computeOptions=speedPattern:fast-speed&profileId=1
- How to use Heavy Goods Vehicle attributes?
-
The graph must include the attributes for Heavy Goods Vehicles (as standard in the graphs supplied by GEOCONCEPT SAS from version M18 upwards) and either calculate an itinerary using a vehicle profile using restrictions (cf. the catalogue of vehicles, editable, defined in the SmartRoutingVehicles.xml file, stored in the folder `‘<GEOCONCEPT_WEB_HOME>’'\smartrouting\jee\smartrouting\conf\ ), or overwrite the call to the web service by using the
computeOptions
parameter with the options length, width, height, weight, axles and/or weightPerAxle.
Example for a journey with a vehicle 4.5 metres high:&computeOptions=height:450