(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.
This web service allows you to classify a list of resources positioned around a particular point in terms of distance or time. It takes as input a start point (in this case, the target location) and a list of resources with their geographic locations, plus a priority category of either 1 or 2 (this is an optional parameter). The resources are records saved in a database of the user’s choice, depending on their requirements. It is the allotted task of the client to select these resources in the database. The resources are returned sorted firstly on the attribute priority1, and then by time or distance (according to which has been chosen). The priorities are optional. The default value of the priorities is 0. This depends on the configured graph, the name of which has been specified in the Geoconcept Web administration interface.
Earlier versions of the web service are conserved in Geoconcept Web to ensure compatibility with earlier software developments. We reommend using the most recent version.
Changes in relation to v4
- Addition of "maxCost", "timeOut" and "computeOptions" parameters.
- Addition in the "nodes" snapMethod of snapping to nearest nodes.
Changes in relation to v3
- Addition of the notion of mode, faster, to snap to graph nodes rather than to geographic coordinates. Addition of the following elements: "locationNode", of the "node" parameter in resources, and "nodes" in snapMethods.
- Addition of the "graphName", "profileId", "profileName", "avoidArea" and "configName" parameters.
Changes in relation to v2
- Addition of the "snapMethod" parameter
- Deletion of the "targetX" and "targetY" double type parameters, replaced by the string type parameter "location"
- Deletion of the "searchMethod" parameter, replaced by "method"
- Deletion of the "rejectFlags" parameter, replaced by "exclusions"
- Deletion of the "projection" parameter, replaced by "srs"
- The "distances" parameter has been renamed "distanceMeters" and it has changed type from integer to double
- The "time" parameter has been renamed "durationSeconds" and has changed type from integer to double
Input
parameter | description | optional | default |
---|---|---|---|
location |
Coordinates of the start point (or arrival point) |
yes * |
|
locationNode |
Start node (or arrival node). Care: a physical node does not have the same ID in another graph. |
yes * |
|
method |
The shortest (distance) or fastest (time) route, or the route as the crow flies (flying) |
yes |
time |
reverse |
if true, the target is considered as an arrival |
yes |
false |
srs |
projection (EPSG code such as epsg:4326 or wgs84) |
yes |
|
exclusions |
List of restriction rules to use, separated by the ";" character (Example: Toll; Tunnel; Bridge) |
yes |
|
resources |
List of resources, separated by ";" characters. |
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 departure on 21 January 2014, at 9.00am in Paris. Caution: the + character can be misinterpreted by browsers, so it is best to substitute it when encountered with %2B. |
yes |
|
snapMethod |
Snap to graph method |
yes |
standard |
graphName (depreciated) |
Name of the graph to use |
yes |
|
profileId (depreciated) |
Vehicle identifier (saved in the vehicle profiles) |
yes |
|
profileName (depreciated) |
Vehicle profile (saved in the vehicle profiles) |
yes |
|
avoidArea |
Forbidden transit zone in WKT format (POLYGON or MULTIPOLYGON) in the requested projection (srs parameter) |
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 |
|
maxCost |
Maximum cost not to exceed in the calculation |
yes |
|
timeOut |
Time out for the calculation (in milliseconds) |
yes |
(*) At least one of the two parameters location, and locationNode must be entered.
(M18) Available from version M18 and later versions of graphs supplied by GEOCONCEPT SAS.
Output
Search Around (searchAroundWebResultsV4)
parameter | type | min/max | description |
---|---|---|---|
location |
double |
0/1 |
Coordinates of the start point (or arrival point) |
method |
string |
0/1 |
Specified input method (time, distance or flying), and time by default. |
srs |
string |
0/1 |
Input projection specified. |
exclusions |
string |
0/unlimited |
List of rules for specified input restrictions |
searchAroundResult |
searchAroundWebResultV4 (or array in JSON / JSON-P) |
0/unlimited |
List of results for each candidate. |
Search Around element (searchAroundWebResultV4)
parameter | type | min/max | description |
---|---|---|---|
id |
string |
0/1 |
Candidate identifier |
distanceMeters |
double |
1/1 |
Distance in metres |
durationSeconds |
double |
1/1 |
Time in seconds |
WSDL
http://<server>
/<webapp>
/api/ws/searchAroundService?wsdl
Query
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sch="http://geoconcept.com/gc/schemas"> <soapenv:Header/> <soapenv:Body> <sch:searchAroundV4> <!--Optional:--> <request> <location> <x>-1.553927</x> <y>47.218580</y> </location> <!--Optional:--> <locationNode></locationNode> <!--Optional:--> <method>time</method> <reverse></reverse> <!--Optional:--> <srs></srs> <!--Optional:--> <exclusions> <!--Zero or more repetitions:--> <exclusion></exclusion> </exclusions> <!--Optional:--> <resources> <!--Zero or more repetitions:--> <resource> <x>-1.593927</x> <y>47.188580</y> <!--Optional:--> <id>1</id> <!--Optional:--> <node></node> <!--Optional:--> <priority1>1</priority1> <!--Optional:--> <priority2>2</priority2> </resource> <resource> <x>-1.556927</x> <y>47.219580</y> <!--Optional:--> <id>2</id> <!--Optional:--> <node></node> <!--Optional:--> <priority1>1</priority1> <!--Optional:--> <priority2>2</priority2> </resource> </resources> <!--Optional:--> <startDateTime></startDateTime> <!--Optional:--> <snapMethod></snapMethod> <!--Optional:--> <graphName></graphName> <!--Optional:--> <profileId></profileId> <!--Optional:--> <profileName></profileName> <!--Optional:--> <avoidArea></avoidArea> <!--Optional:--> <configName></configName> <!--Optional:--> <computeOptions></computeOptions> <!--Optional:--> <maxCost></maxCost> <!--Optional:--> <timeOut></timeOut> </request> </sch:searchAroundV4> </soapenv:Body> </soapenv:Envelope>
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns2:searchAroundV4Response xmlns:ns2="http://geoconcept.com/gc/schemas"> <SearchAroundResult> <status>OK</status> <location>-1.553927,47.21858</location> <method>time</method> <srs/> <exclusions/> <searchAroundResult> <id>2</id> <distanceMeters>424.0</distanceMeters> <durationSeconds>100.0</durationSeconds> </searchAroundResult> <searchAroundResult> <id>1</id> <distanceMeters>6682.0</distanceMeters> <durationSeconds>942.0</durationSeconds> </searchAroundResult> </SearchAroundResult> </ns2:searchAroundV4Response> </soap:Body> </soap:Envelope>
Query
JSON query
http://<server>/<webapp>/api/lbs/searchAround/v4.json?method=time&location=-1.593927,47.218580&resources=1,-1.593927,47.188580,1,2;2,-1.556927,47.219580,1,1
JSON-P query
http://<server>/<webapp>/api/lbs/searchAround/v4.json?method=time&location=-1.593927,47.218580&resources=1,-1.593927,47.188580,1,2;2,-1.556927,47.219580,1,1&callback=myCallback
XML query
http://<server>/<webapp>/api/lbs/searchAround/v4.xml?method=time&location=-1.593927,47.218580&resources=1,-1.593927,47.188580,1,2;2,-1.556927,47.219580,1,1
Response
The response is always in UTF-8 format.
JSON format
{ "message": null, "status": "OK", "location": "-1.593927,47.21858", "locationNode": null, "method": "time", "srs": null, "exclusions": [], "searchAroundResult": [ { "id": "2", "distanceMeters": 4474, "durationSeconds": 796 }, { "id": "1", "distanceMeters": 10453, "durationSeconds": 1114 } ] }
JSON-P format
myCallback( { "message": null, "status": "OK", "location": "-1.593927,47.21858", "method": "time", "srs": null, "exclusions": [], "searchAroundResult": [ { "id": "2", "distanceMeters": 4474, "durationSeconds": 796 }, { "id": "1", "distanceMeters": 10453, "durationSeconds": 1114 } ] } );
XML format
<searchAroundResponseV4> <status>OK</status> <location>-1.593927,47.21858</location> <method>time</method> <searchAroundResult> <id>2</id> <distanceMeters>4474.0</distanceMeters> <durationSeconds>796.0</durationSeconds> </searchAroundResult> <searchAroundResult> <id>1</id> <distanceMeters>10453.0</distanceMeters> <durationSeconds>1114.0</durationSeconds> </searchAroundResult> </searchAroundResponseV4>
Case of a proximity search finding(searchAroundResponse/status is OK)
<searchAroundResponseV4> <status>OK</status> <location>-1.593927,47.21858</location> <method>time</method> <searchAroundResult> <id>2</id> <distanceMeters>4474.0</distanceMeters> <durationSeconds>796.0</durationSeconds> </searchAroundResult> <searchAroundResult> <id>1</id> <distanceMeters>10453.0</distanceMeters> <durationSeconds>1114.0</durationSeconds> </searchAroundResult> </searchAroundResponseV4>
Case of a problem with the graph: file missing, faulty filepath, etc… (searchAroundResponse/status is OK)
<searchAroundResponseV4> <status>OK</status> <location>-1.593927,47.21858</location> <method>time</method> <searchAroundResult> <id>2</id> <distance>-1</distance> <time>-1</time> </searchAroundResult> <searchAroundResult> <id>1</id> <distance>-1</distance> <time>-1</time> </searchAroundResult> </searchAroundResponseV4>
Case of a snap-to-graph error (searchAroundResponse/status is OK)
<searchAroundResponseV4> <status>OK</status> <location>-1.593927,47.21858</location> <method>time</method> <searchAroundResult> <id>2</id> <distance>-1</distance> <time>-1</time> </searchAroundResult> <searchAroundResult> <id>1</id> <distance>-1</distance> <time>-1</time> </searchAroundResult> </searchAroundResponseV4>
Case of an absent location parameter (searchAroundResponse/status is ERROR)
<searchAroundResponseV4> <message>Location must be not null</message> <status>ERROR</status> </searchAroundResponseV4>
Case of an incomplete location parameter, or one with the wrong separator (searchAroundResponse/status is ERROR)
<searchAroundResponseV4> <message>Location point must have 2 components separated with a ,</message> <status>ERROR</status> </searchAroundResponseV4>
Case of the absence of a resource (searchAroundResponse/status is OK)
<searchAroundResponseV4> <message>resources not defined</message> <status>ERROR</status> </searchAroundResponseV4>
Case of a badly formatted resource (searchAroundResponse/status is ERROR)
<serviceResult> <message>ServiceException: not enough fields in candidate 1.-1.5939</message> <status>ERROR</status> </serviceResult>
Input
parameter | description | optional | default |
---|---|---|---|
location |
Coordinates of the start point (or arrival point) |
yes * |
|
locationNode |
Start node (or arrival node). Care: a physical node does not have the same ID in another graph. |
yes * |
|
method |
The shortest (distance) or fastest (time) route, or the route as the crow flies (flying) |
yes |
time |
reverse |
if true, the target is considered as an arrival |
yes |
false |
srs |
projection (EPSG code such as epsg:4326 or wgs84) |
yes |
|
exclusions |
List of restriction rules to use, separated by the ";" character (Example: "Toll"; "Tunnel"; "Bridge") |
yes |
|
resources |
List of resources, separated by ";" characters. |
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 departure on 21 January 2014, at 9.00am in Paris. Caution: the + character can be misinterpreted by browsers, so it is best to substitute it when encountered with %2B. |
yes |
|
snapMethod |
Snap to graph method |
yes |
standard |
graphName |
Name of the graph to use |
yes |
|
profileId |
Vehicle identifier (saved in the vehicle profiles) |
yes |
|
profileName |
Vehicle profile (saved in the vehicle profiles) |
yes |
|
avoidArea |
Forbidden transit zone in WKT format (POLYGON or MULTIPOLYGON) in the requested projection (srs parameter) |
yes |
|
configName |
Name of the configuration to use (defined in Geoconcept Web - Administration / Tools / Road graphs) |
yes |
(*) At least one of the two parameters location, and locationNode must be entered.
Output
Search Around (searchAroundWebResultsV3)
parameter | type | min/max | description |
---|---|---|---|
location |
double |
0/1 |
Coordinates of the start point (or arrival point) |
method |
string |
0/1 |
Specified input method (time, distance or flying), and time by default. |
srs |
string |
0/1 |
Input projection specified. |
exclusions |
string |
0/unlimited |
List of rules for specified input restrictions |
searchAroundResult |
searchAroundWebResultV3 (or array in JSON / JSON-P) |
0/unlimited |
List of results for each candidate. |
Search Around element (searchAroundWebResultV3)
parameter | type | min/max | description |
---|---|---|---|
id |
string |
0/1 |
Candidate identifier |
distanceMeters |
double |
1/1 |
Distance in metres |
durationSeconds |
double |
1/1 |
Time in seconds |
WSDL
http://<server>
/<webapp>
/api/ws/searchAroundService?wsdl
Query
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sch="http://geoconcept.com/gc/schemas"> <soapenv:Header/> <soapenv:Body> <sch:searchAroundV3> <!--Optional:--> <request> <location> <x>-1.553927</x> <y>47.218580</y> </location> <!--Optional:--> <locationNode></locationNode> <!--Optional:--> <method>time</method> <reverse></reverse> <!--Optional:--> <srs></srs> <!--Optional:--> <exclusions> <!--Zero or more repetitions:--> <exclusion></exclusion> </exclusions> <!--Optional:--> <resources> <!--Zero or more repetitions:--> <resource> <x>-1.593927</x> <y>47.188580</y> <!--Optional:--> <id>1</id> <!--Optional:--> <node></node> <!--Optional:--> <priority1>1</priority1> <!--Optional:--> <priority2>2</priority2> </resource> <resource> <x>-1.556927</x> <y>47.219580</y> <!--Optional:--> <id>2</id> <!--Optional:--> <node></node> <!--Optional:--> <priority1>1</priority1> <!--Optional:--> <priority2>2</priority2> </resource> </resources> <!--Optional:--> <startDateTime></startDateTime> <!--Optional:--> <snapMethod></snapMethod> <!--Optional:--> <graphName></graphName> <!--Optional:--> <profileId></profileId> <!--Optional:--> <profileName></profileName> <!--Optional:--> <avoidArea></avoidArea> <!--Optional:--> <configName></configName> </request> </sch:searchAroundV3> </soapenv:Body> </soapenv:Envelope>
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns2:searchAroundV3Response xmlns:ns2="http://geoconcept.com/gc/schemas"> <SearchAroundResult> <status>OK</status> <location>-1.553927,47.21858</location> <method>time</method> <srs/> <exclusions/> <searchAroundResult> <id>2</id> <distanceMeters>424.0</distanceMeters> <durationSeconds>147.0</durationSeconds> </searchAroundResult> <searchAroundResult> <id>1</id> <distanceMeters>6682.0</distanceMeters> <durationSeconds>1059.0</durationSeconds> </searchAroundResult> </SearchAroundResult> </ns2:searchAroundV3Response> </soap:Body> </soap:Envelope>
Query
JSON query
http://<server>/<webapp>/api/lbs/searchAround/v3.json?method=time&location=-1.593927,47.218580&resources=1,-1.593927,47.188580,1,2;2,-1.556927,47.219580,1,1
JSON-P query
http://<server>/<webapp>/api/lbs/searchAround/v3.json?method=time&location=-1.593927,47.218580&resources=1,-1.593927,47.188580,1,2;2,-1.556927,47.219580,1,1&callback=myCallback
XML query
http://<server>/<webapp>/api/lbs/searchAround/v3.xml?method=time&location=-1.593927,47.218580&resources=1,-1.593927,47.188580,1,2;2,-1.556927,47.219580,1,1
Response
The response is always in UTF-8 format.
JSON format
{ "message": null, "status": "OK", "location": "-1.593927,47.21858", "locationNode": null, "method": "time", "srs": null, "exclusions": [], "searchAroundResult": [ { "id": "2", "distanceMeters": 4474, "durationSeconds": 796 }, { "id": "1", "distanceMeters": 10453, "durationSeconds": 1114 } ] }
JSON-P format
myCallback( { "message": null, "status": "OK", "location": "-1.593927,47.21858", "method": "time", "srs": null, "exclusions": [], "searchAroundResult": [ { "id": "2", "distanceMeters": 4474, "durationSeconds": 796 }, { "id": "1", "distanceMeters": 10453, "durationSeconds": 1114 } ] } );
XML format
<searchAroundResponseV3> <status>OK</status> <location>-1.593927,47.21858</location> <method>time</method> <searchAroundResult> <id>2</id> <distanceMeters>4474.0</distanceMeters> <durationSeconds>796.0</durationSeconds> </searchAroundResult> <searchAroundResult> <id>1</id> <distanceMeters>10453.0</distanceMeters> <durationSeconds>1114.0</durationSeconds> </searchAroundResult> </searchAroundResponseV3>
Case of a proximity search finding(searchAroundResponse/status is OK)
<searchAroundResponseV3> <status>OK</status> <location>-1.593927,47.21858</location> <method>time</method> <searchAroundResult> <id>2</id> <distanceMeters>4474.0</distanceMeters> <durationSeconds>796.0</durationSeconds> </searchAroundResult> <searchAroundResult> <id>1</id> <distanceMeters>10453.0</distanceMeters> <durationSeconds>1114.0</durationSeconds> </searchAroundResult> </searchAroundResponseV3>
Case of a problem with the graph: file missing, faulty filepath, etc… (searchAroundResponse/status is OK)
<searchAroundResponseV3> <status>OK</status> <location>-1.593927,47.21858</location> <method>time</method> <searchAroundResult> <id>2</id> <distance>-1</distance> <time>-1</time> </searchAroundResult> <searchAroundResult> <id>1</id> <distance>-1</distance> <time>-1</time> </searchAroundResult> </searchAroundResponseV3>
Case of a snap-to-graph error (searchAroundResponse/status is OK)
<searchAroundResponseV3> <status>OK</status> <location>-1.593927,47.21858</location> <method>time</method> <searchAroundResult> <id>2</id> <distance>-1</distance> <time>-1</time> </searchAroundResult> <searchAroundResult> <id>1</id> <distance>-1</distance> <time>-1</time> </searchAroundResult> </searchAroundResponseV3>
Case of an absent location parameter (searchAroundResponse/status is ERROR)
<searchAroundResponseV3> <message>Location must be not null</message> <status>ERROR</status> </searchAroundResponseV3>
Case of an incomplete location parameter, or one with the wrong separator (searchAroundResponse/status is ERROR)
<searchAroundResponseV3> <message>Location point must have 2 components separated with a ,</message> <status>ERROR</status> </searchAroundResponseV3>
Case of the absence of a resource (searchAroundResponse/status is OK)
<searchAroundResponseV3> <status>OK</status> </searchAroundResponseV3>
Case of a badly formatted resource (searchAroundResponse/status is ERROR)
<serviceResult> <message>ServiceException: not enough fields in candidate 1.-1.5939</message> <status>ERROR</status> </serviceResult>
Input
parameter | description | optional | default |
---|---|---|---|
location |
Coordinates of the start point (or arrival point) |
no |
|
method |
The shortest (distance) or fastest (time) route, or the route as the crow flies (flying) |
yes |
time |
reverse |
if true, the target is considered as an arrival |
yes |
false |
srs |
projection (EPSG code such as epsg:4326 or wgs84) |
yes |
|
exclusions |
List of restriction rules to use, separated by the ";" character (Example: "Toll"; "Tunnel"; "Bridge") |
yes |
|
resources |
List of resources, separated by ";" characters. |
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 |
Output
Search Around (searchAroundWebResultsV2)
parameter | type | min/max | description |
---|---|---|---|
location |
double |
0/1 |
Coordinates of the start point (or arrival point) |
method |
string |
0/1 |
Specified input method (time, distance or flying), and time by default. |
srs |
string |
0/1 |
Input projection specified. |
exclusions |
string |
0/unlimited |
List of rules for specified input restrictions |
searchAroundResult |
searchAroundWebResultV2 (or array in JSON / JSON-P) |
0/unlimited |
List of results for each candidate. |
Search Around element(searchAroundWebResultV2)
parameter | type | min/max | description |
---|---|---|---|
id |
string |
0/1 |
Candidate identifier |
distanceMeters |
double |
1/1 |
Distance in metres |
durationSeconds |
double |
1/1 |
Time in seconds |
WSDL
http://<server>
/<webapp>
/api/ws/searchAroundService?wsdl
Query
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sch="http://geoconcept.com/gc/schemas"> <soapenv:Header/> <soapenv:Body> <sch:searchAroundV2> <!--Optional:--> <request> <location> <x>-1.553927</x> <y>47.218580</y> </location> <!--Optional:--> <method>time</method> <reverse></reverse> <!--Optional:--> <srs></srs> <!--Optional:--> <exclusions> <!--Zero or more repetitions:--> <exclusion></exclusion> </exclusions> <!--Optional:--> <resources> <!--Zero or more repetitions:--> <resource> <x>-1.593927</x> <y>47.188580</y> <!--Optional:--> <id>1</id> <!--Optional:--> <priority1>1</priority1> <!--Optional:--> <priority2>2</priority2> </resource> <resource> <x>-1.556927</x> <y>47.219580</y> <!--Optional:--> <id>2</id> <!--Optional:--> <priority1>1</priority1> <!--Optional:--> <priority2>2</priority2> </resource> </resources> <!--Optional:--> <startDateTime></startDateTime> <!--Optional:--> <snapMethod></snapMethod> </request> </sch:searchAroundV2> </soapenv:Body> </soapenv:Envelope>
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns2:searchAroundV2Response xmlns:ns2="http://geoconcept.com/gc/schemas"> <SearchAroundResult> <status>OK</status> <location>-1.553927,47.21858</location> <method>time</method> <srs/> <exclusions/> <searchAroundResult> <id>2</id> <distanceMeters>424.0</distanceMeters> <durationSeconds>147.0</durationSeconds> </searchAroundResult> <searchAroundResult> <id>1</id> <distanceMeters>6682.0</distanceMeters> <durationSeconds>1059.0</durationSeconds> </searchAroundResult> </SearchAroundResult> </ns2:searchAroundV2Response> </soap:Body> </soap:Envelope>
Query
JSON query
http://<server>/<webapp>/api/lbs/searchAround/v2.json?method=time&location=-1.593927,47.218580&resources=1,-1.593927,47.188580,1,2;2,-1.556927,47.219580,1,1
JSON-P query
http://<server>/<webapp>/api/lbs/searchAround/v2.json?method=time&location=-1.593927,47.218580&resources=1,-1.593927,47.188580,1,2;2,-1.556927,47.219580,1,1&callback=myCallback
XML query
http://<server>/<webapp>/api/lbs/searchAround/v2.xml?method=time&location=-1.593927,47.218580&resources=1,-1.593927,47.188580,1,2;2,-1.556927,47.219580,1,1
Response
The response is always in UTF-8 format.
JSON format
{ "message": null, "status": "OK", "location": "-1.593927,47.21858", "method": "time", "srs": null, "exclusions": [], "searchAroundResult": [ { "id": "2", "distanceMeters": 3376, "durationSeconds": 735 }, { "id": "1", "distanceMeters": 10453, "durationSeconds": 1114 } ] }
JSON-P format
myCallback( { "message": null, "status": "OK", "location": "-1.593927,47.21858", "method": "time", "srs": null, "exclusions": [], "searchAroundResult": [ { "id": "2", "distanceMeters": 3376, "durationSeconds": 735 }, { "id": "1", "distanceMeters": 10453, "durationSeconds": 1114 } ] } );
XML format
<searchAroundResponse> <status>OK</status> <location>-1.593927,47.21858</location> <method>time</method> <searchAroundResult> <id>2</id> <distanceMeters>3376.0</distanceMeters> <durationSeconds>735.0</durationSeconds> </searchAroundResult> <searchAroundResult> <id>1</id> <distanceMeters>10453.0</distanceMeters> <durationSeconds>1114.0</durationSeconds> </searchAroundResult> </searchAroundResponse>
Case of a proximity search finding(searchAroundResponse/status is OK)
<searchAroundResponse> <status>OK</status> <location>-1.593927,47.21858</location> <method>time</method> <searchAroundResult> <id>2</id> <distanceMeters>3376.0</distanceMeters> <durationSeconds>735.0</durationSeconds> </searchAroundResult> <searchAroundResult> <id>1</id> <distanceMeters>10453.0</distanceMeters> <durationSeconds>1114.0</durationSeconds> </searchAroundResult> </searchAroundResponse>
Case of a problem with the graph: file missing, faulty filepath, etc… (searchAroundResponse/status is OK)
<searchAroundResponse> <status>OK</status> <location>-1.593927,47.21858</location> <method>time</method> <searchAroundResult> <id>2</id> <distance>-1</distance> <time>-1</time> </searchAroundResult> <searchAroundResult> <id>1</id> <distance>-1</distance> <time>-1</time> </searchAroundResult> </searchAroundResponse>
Case of a snap-to-graph error (searchAroundResponse/status is OK)
<searchAroundResponse> <status>OK</status> <location>-1.593927,47.21858</location> <method>time</method> <searchAroundResult> <id>2</id> <distance>-1</distance> <time>-1</time> </searchAroundResult> <searchAroundResult> <id>1</id> <distance>-1</distance> <time>-1</time> </searchAroundResult> </searchAroundResponse>
Case of an absent location parameter (searchAroundResponse/status is ERROR)
<searchAroundResponse> <message>Location must be not null</message> <status>ERROR</status> </searchAroundResponse>
Case of an incomplete location parameter, or one with the wrong separator (searchAroundResponse/status is ERROR)
<searchAroundResponse> <message>Location point must have 2 components separated with a ,</message> <status>ERROR</status> </searchAroundResponse>
Case of the absence of a resource (searchAroundResponse/status is OK)
<searchAroundResponse> <status>OK</status> </searchAroundResponse>
Case of a badly formatted resource (searchAroundResponse/status is ERROR)
<serviceResult> <message>ServiceException: not enough fields in candidate 1.-1.5939</message> <status>ERROR</status> </serviceResult>
Input
parameter | description | optional | default |
---|---|---|---|
targetX |
X coordinates or longitude of the target location |
yes |
|
targetY |
Y coordinates or latitude of the target location |
yes |
|
searchMethod |
Deprecated, replaced by method |
yes |
time |
method |
The shortest (distance) or fastest (time) route |
yes |
time |
reverse |
if true, the target is considered as a finish point |
yes |
false |
projection |
Deprecated, replaced by srs |
yes |
|
srs |
projection (EPSG code such as epsg:4326 or wgs84) |
yes |
|
rejectFlags |
Deprecated, replaced by exclusions |
yes |
|
exclusions |
List of restriction rules to use, separated by the ";" character (Example: "Toll"; "Tunnel"; "Bridge") |
yes |
|
resources |
List of resources, separated by ";" characters. |
yes |
Output
Search Around (searchAroundWebResults)
parameter | type | min/max | description |
---|---|---|---|
targetX |
double |
1/1 |
X coordinates or longitude of the target location |
targetY |
double |
1/1 |
Y coordinates or latitude of the target location |
method |
string |
0/1 |
Specified input method |
projection |
string |
0/1 |
Deprecated, replaced by srs |
srs |
string |
0/1 |
Specified input projection |
exclusions |
string |
0/unlimited |
List of restriction rules specified as input |
searchAroundResult |
array |
0/unlimited |
List of responses |
Search Around element(searchAroundWebResult)
parameter | type | min/max | description |
---|---|---|---|
id |
string |
0/1 |
Candidate identifier |
distance |
int |
1/1 |
Distance in metres |
time |
int |
1/1 |
Time in seconds |
WSDL
http://<server>
/<webapp>
/api/ws/searchAroundService?wsdl
Query
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sch="http://geoconcept.com/gc/schemas"> <soapenv:Header/> <soapenv:Body> <sch:searchAround> <!--Optional:--> <request> <!--Optional:--> <target> <x>-1.553927</x> <y>47.218580</y> </target> <!--Optional:--> <searchMethod></searchMethod> <!--Optional:--> <method>time</method> <reverse></reverse> <!--Optional:--> <srs></srs> <!--Optional:--> <exclusions> <!--Zero or more repetitions:--> <exclusion></exclusion> </exclusions> <!--Optional:--> <rejectFlags> <!--Zero or more repetitions:--> <rejectFlag></rejectFlag> </rejectFlags> <!--Optional:--> <resources> <!--Zero or more repetitions:--> <resource> <x>-1.593927</x> <y>47.188580</y> <!--Optional:--> <id>1</id> <!--Optional:--> <priority1>1</priority1> <!--Optional:--> <priority2>2</priority2> </resource> <resource> <x>-1.556927</x> <y>47.219580</y> <!--Optional:--> <id>2</id> <!--Optional:--> <priority1>1</priority1> <!--Optional:--> <priority2>2</priority2> </resource> </resources> </request> </sch:searchAround> </soapenv:Body> </soapenv:Envelope>
Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns2:searchAroundResponse xmlns:ns2="http://geoconcept.com/gc/schemas"> <SearchAroundResult> <status>OK</status> <targetX>-1.553927</targetX> <targetY>47.21858</targetY> <method>time</method> <projection/> <srs/> <exclusions/> <searchAroundResult> <id>2</id> <distance>485</distance> <time>87</time> </searchAroundResult> <searchAroundResult> <id>1</id> <distance>6788</distance> <time>526</time> </searchAroundResult> </SearchAroundResult> </ns2:searchAroundResponse> </soap:Body> </soap:Envelope>
Query
JSON query
http://<server>/<webapp>/api/lbs/searchAround.json?method=time&targetX=-1.593927&targetY=47.218580&resources=1,-1.593927,47.188580,1,2;2,-1.556927,47.219580,1,1
JSON-P query
http://<server>/<webapp>/api/lbs/searchAround.json?method=time&targetX=-1.593927&targetY=47.218580&resources=1,-1.593927,47.188580,1,2;2,-1.556927,47.219580,1,1&callback=myCallback
XML query
http://<server>/<webapp>/api/lbs/searchAround.xml?method=time&targetX=-1.593927&targetY=47.218580&resources=1,-1.593927,47.188580,1,2;2,-1.556927,47.219580,1,1
Response
The response is always in UTF-8 format.
JSON format
{ "message": null, "status": "OK", "targetX": -1.593927, "targetY": 47.21858, "method": "time", "projection": null, "srs": null, "exclusions": [], "searchAroundResult": [ { "id": "2", "distance": 3880, "time": 777 }, { "id": "1", "distance": 10448, "time": 1178 } ] }
JSON-P format
myCallback( { "message": null, "status": "OK", "targetX": -1.593927, "targetY": 47.21858, "method": "time", "projection": null, "srs": null, "exclusions": [], "searchAroundResult": [ { "id": "2", "distance": 3880, "time": 777 }, { "id": "1", "distance": 10448, "time": 1178 } ] } );
XML format
<searchAroundResponse> <status>OK</status> <targetX>-1.593927</targetX> <targetY>47.21858</targetY> <method>time</method> <searchAroundResult> <id>2</id> <distance>3880</distance> <time>777</time> </searchAroundResult> <searchAroundResult> <id>1</id> <distance>10448</distance> <time>1178</time> </searchAroundResult> </searchAroundResponse>
Case of a proximity search finding(searchAroundResponse/status is OK)
<searchAroundResponse> <status>OK</status> <targetX>-1.593927</targetX> <targetY>47.21858</targetY> <method>time</method> <searchAroundResult> <id>2</id> <distance>3880</distance> <time>777</time> </searchAroundResult> <searchAroundResult> <id>1</id> <distance>10448</distance> <time>1178</time> </searchAroundResult> </searchAroundResponse>
Case of a problem with the graph: file missing, faulty filepath, etc… (searchAroundResponse/status is OK)
<searchAroundResponse> <status>OK</status> <targetX>-1.593927</targetX> <targetY>47.21858</targetY> <method>time</method> <searchAroundResult> <id>2</id> <distance>-1</distance> <time>-1</time> </searchAroundResult> <searchAroundResult> <id>1</id> <distance>-1</distance> <time>-1</time> </searchAroundResult> </searchAroundResponse>
Case of a snap-to-graph error (searchAroundResponse/status is OK)
<searchAroundResponse> <status>OK</status> <targetX>-51.593927</targetX> <targetY>47.21858</targetY> <method>time</method> <searchAroundResult> <id>2</id> <distance>-1</distance> <time>-1</time> </searchAroundResult> <searchAroundResult> <id>1</id> <distance>-1</distance> <time>-1</time> </searchAroundResult> </searchAroundResponse>
Case of unspecified target point (searchAroundResponse/status is OK)
<searchAroundResponse> <status>OK</status> <targetX>0.0</targetX> <targetY>0.0</targetY> <method>time</method> <searchAroundResult> <id>2</id> <distance>-1</distance> <time>-1</time> </searchAroundResult> <searchAroundResult> <id>1</id> <distance>-1</distance> <time>-1</time> </searchAroundResult> </searchAroundResponse>
Case of the absence of a resource (searchAroundResponse/status is OK)
<searchAroundResponse> <status>OK</status> <targetX>0.0</targetX> <targetY>0.0</targetY> </searchAroundResponse>
Case of a badly formatted resource (searchAroundResponse/status is ERROR)
<serviceResult> <message>ServiceException: not enough fields in candidate 2,-1.556927,</message> <status>ERROR</status> </serviceResult>
- 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?
+
&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