<networkDataName_uri>/path[.<format>]
The paths resource represents the optimal path analysis function. With parameters properly set, a GET request can be performed on the paths resource to retrieve an optimal path analysis result. For detailed description of the optimal path analysis, please refer to Optimal path analysis.
Supported methods
Supported output formats: rjson, json, html, xml.
Below is an example of performing an HTTP request on a URI with rjson as the output format. In the URI: supermapiserver is the name of the server; RoadNet@Changchun is the name of the network data for optimal path analysis; [2,8] is an array of nodes representing the locations on which the path analysis is to be performed, i.e., the task is to find the least-cost path between node 2 and node 8.
http://supermapiserver:8090/iserver/services/transportationanalyst-sample/rest/networkanalyst/RoadNet@Changchun/path.rjson?nodes=[2,8]
Gets an optimal path analysis result.
Proper parameters need to be included in the URI when performing a GET request on the path resource.
Field | Type | Definition |
nodes | int[]/Point2D[] | Required A set of nodes on which the optimal path analysis is to be performed. |
hasLeastEdgeCount | boolean | Whether to search for the least-cost path based on the minimum number of edges. |
parameter | TransportationAnalystParameter | General parameters for transportation network analyst. |
After the optimal path analysis function is performed, the returned representation of the operation result has the following structure (the representation is included in the entity body of the response message):
Name | Type | Description |
pathList | List<Path> | A list of path(s) resulted from optimal path analysis (currently only one element is allowed in the list). |
Performing a GET request on the following URI is to perform a optimal path analysis on the RoadNet@Changchun dataset:
http://localhost:8090/iserver/services/transportationanalyst-sample/rest/networkanalyst/RoadNet@Changchun/path.rjson?nodes=[2,8]
The returned response content is as follows:
Asks for the response identical to the one that would correspond to a GET request, but without the response body. This is useful for retrieving meta-information written in response headers, without having to transport the entire content. The meta-information includes the media-type, content-encoding, transfer-encoding, content-length, etc.
HEAD request can be used to check if the path resource exists, or if the resource can be accessed by clients. It can also determine if the path resource supports an output format <format> if performed on a URI with .<format> included.