<networkDataName_uri>/servicearea[.<format>]
The serviceAreas resource represents the service area analysis function. With parameters properly set, a GET request can be performed on the serviceAreas resource to retrieve a service area analysis result. For detailed description of the service area analysis, please refer to Service area analysis.
Supported methods
Supported output formats:rjson, json, html, xml, jsonp.
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 analysis; [2,4] is an array of nodes representing the service centers to be analyzed; and [500,1000] is a set of service radii.
http://supermapiserver:8090/iserver/services/transportationanalyst-sample/rest/networkanalyst/RoadNet@Changchun/servicearea.rjson?centers=[2,4]&weights=[500,1000]
Gets a service area analysis result.
Proper parameters need to be included in the URI when performing a GET request on the serviceArea resource.
Field | Type | Definition |
centers | int[]/Point2D[] | Required A set of service centers. |
weights | double [] | Required A list of service radii. The size of the list is the number of service centers. Each value in the list specifies the service extent when performing service area analysis on each service center. |
isFromCenter | boolean | Whether to start the analysis from the center. |
isCenterMutuallyExclusive | boolean | Whether to make service areas mutually exclusive based on the distance between the service centers. |
parameter | TransportationAnalystParameter | General parameters for transportation network analyst. |
After a service area 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 |
serviceAreaList | List<ServiceAreaResult> | A list of service area(s). The ith element in the list corresponds to the service area of the ith service center. |
Performing a GET request on the following URI is to perform service area analysis on the RoadNet@Changchun dataset:
http://supermapiserver:8090/iserver/services/transportationanalyst-sample/rest/networkanalyst/RoadNet@Changchun/servicearea.rjson?centers=[2,4]&weights=[500,1000]
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 serviceArea resource exists, or if the resource can be accessed by clients. It can also determine if the serviceArea resource supports an output format <format> if performed on a URI with .<format> included.