<geometry_uri>/overlay[.<format>]
Result set resources for geometry object overlay analysis.
Supported methods
Supported output formats: rjson, json, html, xml.
http://supermapiserver:8090/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst/geometry/overlay.rjson
Gets a form for the POST request.
Performing a POST request on the resource with related parameters creates the resource of a spatial analysis result, i.e., performs an overlay analysis.
Parameters in the URI are as follows:
Field | Type | Definition |
asynchronousReturn | boolean | Whether to adopt asynchronous operation. If true, the URI of the new resource will be immediately returned after the clients submit a request (i.e., the setting of returnContent is not effective); if false, the representation or the URI of the new resource will be returned according to the setting of returnContent once the analysis is finished on the server. The default value is false. |
returnContent | boolean | Returns the description or the URI of the new resource. If true, returns the description for the analysis result. If false, returns the URI. The default is false. |
Parameters in the request body are as follows:
Name | Type | Description |
sourceGeometry |
Geometry |
Source geometry, which is the geometry object being operated on. The type it suppoted dependend on the operation type. For the clip, erase, intersect, and identity operations, the source geometry can be point, line, or polygon; for the union, update, and XOR operations, the source geometry can be polygon. |
operateGeometry | Geometry |
Operate geometry, the data type of which is polygon in most operation scenarios. When the operation type is intersect, the data type can be line or polygon: 1. When the source geometry is line and the operate geometry is line, the analysis result is line;2. When the source geometry is point and the operate geometry is polygon, the analysis result is point; 3. When the source geometry is line and the operate geometry is polygon, the analysis result is line; 4. When the source geometry is polygon and the operate geometry is polygon, the analysis result is polygon. |
tolerance | double | Node tolerance. During the node snapping process in overlay analysis, the node tolerance sets the degree of tolerance for node snapping. If the distance between two points is less than the node tolerance, they will be considered as overlapping nodes; points with a distance greater than the node tolerance remain unchanged. The default value is 0.0000000001. |
operation | String | The overlay operation. The operations include clip, erase, identity, intersect, union, update, and XOR. |
Normal response code(s): 201. The response parameters are as follows:
Name | Type | Description |
succeed |
boolean | Whether query is successful. |
newResourceID | String | The ID for the query result resource. |
postResultType | PostResultType |
The type of the result from a POST request. Lists and describes the impact of a POST request on the target resource, i.e., the analysis result. |
newResourceLocation | String | The URI of the newly created resource. |
Perform the POST request on the overlay resource with http://supermapiserver:8090/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst/geometry/overlay.rjson and the response in rjson format is as follows:
{
"sourceGeometry": {
"type": "REGION",
"points": [{
"x": 23,
"y": 23
},
{
"x": 33,
"y": 35
},
{
"x": 43,
"y": 22
}]
},
"operateGeometry": {
"type": "REGION",
"points": [{
"x": 23,
"y": 23
},
{
"x": 34,
"y": 47
},
{
"x": 50,
"y": 12
}]
},
"operation": "CLIP"
}
The response in json format is as follows:
{
"succeed": true,
"newResourceID": "1",
"postResultType": "CreateChild",
"newResourceLocation": "http://supermapiserver:8090/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst/geometry/overlay/1"
}
Perform the GET request on http://supermapiserver:8090/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst/geometry/overlay/1.rjson can get the overlay analysis result. Please see geometryOverlayResult.
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 geometryOverlayResults resource exists, or if the resource can be accessed by clients. It can also determine if the geometryOverlayResults resource supports an output format <format> if performing on a URI with .<format> included.