<geometry_uri>/area[.<format>]
area resource represents an algorithm resource. As a child resource of geometry resource, it is used to calculating area according to specified parameters, which need to be included in URI and cannot be placed in the request body.
Supported Methods:
Supported output formats: RJSON, JSON, HTML, XML.
Execute HTTP request on the following URI, here we take rjosn as the output format as an example. Where, supermapiserver is the server name.
http://supermapiserver:8090/iserver/services/geometry/restjsr/v1/geometry/area.rjson
Calculates area on the map according to parameters.
The following request parameters used when calculating area need to be containd in URI and cannot be placed in the request body.
Name | Type | Definition |
point2Ds | Point2D[] | [Required] Points used to calculate area. |
unit | Unit | [Required] The expected unit of the returned result. |
prjCoordSys | PrjCoordSys |
[Required] The coordinate reference system of the points used to calculate area. You can build a PrjCoordSys object with its fields structure, and you also can build it by passing the epsgCode, such as: prjCoordSys={"epsgCode":3857}. |
_cache | boolean |
[Required] Whether to use cache. Defaults to true. false means all the caches are disabled. |
By executing a GET request on area resource, the returned response structure is as follows:
Field | Type | Description |
area | double | Area result. |
unit | Unit | Unit of the area result. |
By executing a GET request on area resource with URI: http://localhost:8090/iserver/services/geometry/restjsr/v1/geometry/area?point2Ds=[{%22x%22:%2023.00,%22y%22:34.00},{%22x%22:%2053.55,%22y%22:12.66},{%22x%22:%2073.88,%22y%22:12.6}]&unit=KILOMETER&prjCoordSys={epsgcode:4326}, the returned response result in rjosn format is as follows:
{
"area": 3157590.930368346,
"distance": -1,
"unit": "KILOMETER"
}
Returns the same HTTP response header as the GET request, but no response entity, which can be used to retrieve the meta data contained in response message header without having to transmit the entire response content. Meta data information includes media type, character coding, compression coding, entity content length, etc.
HEAD request is used to determine whether the area resource exists, or if the client has the authority to access it. By executing an HEAD request with a .<format> URI, you can quickly determine whether the area resource supports the <format> representation.