curvature


URI

<terrainCalculation_uri>/curvature[.<format>]

Supported methods

GET, POST, HEAD

Parent resource

terrainCalculation

Child resources

curvatureResult

Introduction

Implement the curvature on specified grid data.

Terrain curvature is one of the important parameters of expressing terrain surface structure. The surface curvature of DEM grid data every pixel is got from that fit the target pixel and eight adjacent pixels into quadric surface, then get the curvature for fitting surface in (0,0).   

You can calculate the mean curvature dataset, profile curvature dataset, plan curvature dataset. These three datasets have the same size and resolution with original datasets.

Supported Methods:

Supported output formats: rjson, json, html, xml.

Resource hierarchy

HTTP request methods

Implement the HTTP request on the following URI, where supermapiserver is the server name, with rjson being the output format.

http://supermapiserver:8090/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst/datasets/JingjinHillshade@Jingjin/terraincalculation/curvature.rjson

GET request

Gets the form to calculate the curvature.

POST request

Implement the curvature on specified grid data.

Request parameter

Parameters passed in the request body are as follows:

Name Type Description
deleteExistResultDataset boolean Whether to delete the existing dataset if the name of the result dataset named by users is the same as that of an existing dataset.
averageCurvatureName String [Required]
Specifies the dataset name of output mean curvature.
profileCurvatureName String Output the dataset name of profile curvature.
planCurvatureName String Output the dataset name of plane curvature.
zFactor double The specified altitude scale coefficient. Default is1.0, representing don't scale.
In DEM grid data, this value is the unit transformation coefficient that grid value (Z) is related to X and Y. Usually, in a operation with X, Y and Z, it needs to multiply by a elevation scale coefficient, making the three has same unit. For example, the unit of X and Y is meter, but Z is feet. So it needs to multiply by 0.3048. the scale coefficient is 0.3048.

Response structure

Normal response code(s): 201. The response parameters are as follows:

Field Type Description
succeed Boolean Whether the analysis is successful.
newResourceID String The ID for the analysis result resource.
postResultType PostResultType The result type fo the POST request.
newResourceLocation String The URI of the newly created resource.

Response example

Implement the POST request on the curvature resource http://localhost:8090/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst/datasets/JingjinTerrain%40Jingjin/terraincalculation/curvature.rjson. The returned rjson is as follows:

{

    "zFactor": 1,

    "averageCurvatureName": "test1",

    "profileCurvatureName": "test2",

    "planCurvatureName": "test3",

    "deleteExistResultDataset": false

}

The response result in rjson format returned is as follows:

{

    "succeed": true,

    "newResourceID": "6b7fe42a934c49fa93fe5b8b7541d2db_e9e94b4996c247798d7d0f985e6f0c1a",

    "postResultType": "CreateChild",

    "newResourceLocation": "http://localhost:8090/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst/datasets/JingjinTerrain@Jingjin/terraincalculation/curvature/6b7fe42a934c49fa93fe5b8b7541d2db_e9e94b4996c247798d7d0f985e6f0c1a"

}

Implement the GET request on http://localhost:8090/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst/datasets/JingjinTerrain@Jingjin/terraincalculation/curvature/6b7fe42a934c49fa93fe5b8b7541d2db_e9e94b4996c247798d7d0f985e6f0c1a.rjson. You can view the analysis result and get the result dataset info.

HEAD request

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 curvature resource exists, or if the curvature resource can be accessed by clients. It can also determine if the curvature resource supports an output format <format> if performed on a URI with .<format> included.

See