batch


URI

<geometryOverlayResult_uri>/batch[.<format>]

Supported methods

GET, POST, HEAD

Parent resource

geometryOverlayResults

Introduction

The batch spatial object overlay analysis result set resource. Implement the POST request on the batch resource allows you to create a batch object to overlay analysis result.

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/spatialAnalysis-spatialAnalyst/restjsr/spatialanalyst/geometry/overlay/batch.rjson

GET request

Gets the form of executing a POST request.

POST request

Request parameter

URI parameters are as follows:

Name Type Description
ignoreAnalystParam boolean Set whether to ignore the source geometry object and operation geometry object participating the analysis in the returned results. To avoid too much description of the returned results, you can set ignoreAnalystParam to true, that is, not displaying the source geometry object and operation object participating the analysis.
returnContent boolean Whether to immediately return the representation of the newly created resource or the URI of the new resource. If true, the newly created resource will be returned directly, that is, the representation of the analysis result. If false, the URI of the newly created resource will be returned. The default value is false.

Following arguments should be included in the request body:

Field Type Description

sourceGeometry

Geometry[]

Source geometry object, that is, the operated geometry object. Its data type and the operation type are related.
The operated geometry object of the clip operation can be line, region objects; the operated geometry object of the erase and identity operations can be point, line, and region objects; the operated geometry object of intersect, union, update, XOR operations can be region objects.
operateGeometry Geometry[] The operation geometry object data, and the data type is region geometry object.
operation String The overlay operation, which can be clip, ease, identity, intersect, union, update, XOR, update.

 

Response structure

 When returnContent is false, the returned result is the URI of the analysis result. The parameters of the response results are as follows:

Field Type Description

succeed

boolean Whether the query is successful.
newResourceID String ID of the analysis result resource.
postResultType PostResultType

The result type of the POST request, which describes how the post request affects the target resource, that is, what the result is.

newResourceLocation String URI of the newly created resource.

When returnContent is true, the returned result resource is the representation collection, where a single description collection includes:

Field Type Description
succeed boolean Whether the overlay analysis is successful. If successful, true will be returned; otherwise, false will be returned.
image ImageResult

Spatial analysis result picture. It represents the picture generated by SuperMap iServer spatial analysis results and the related description of the picture.

message String Related information generated during overlay analysis.
resultGeometry Geometry Spatial analysis result geometry object.
operateGeometry Geometry[] The operation geometry object data. When you set ignoreAnalystParam to false in URI or you do not set ignoreAnalystParam, operateGeometry will have a value; otherwise, it will be null.
sourceGeometry Geometry[] The soruce geometry object data. When you set ignoreAnalystParam to false in URI or you do not set ignoreAnalystParam, sourceGeometry will have a value; otherwise, it will be null.

 

Response example

Implement the POST request on the batch resource. The URI is http://supermapiserver:8090/iserver/services/spatialAnalysis-spatialAnalyst/restjsr/spatialanalyst/geometry/overlay/batch.rjson?returnContent=true&ignoreAnalystParam=true, and the request body is as follows:

{"sourceGeometries":[{"type":"REGION", "points":[{"x":23, "y":23}, {"x":33, "y":35}, {"x":43, "y":22}]},{"type":"REGION", "points":[{"x":25, "y":25}, {"x":37, "y":39}, {"x":45, "y":24}]}], "operateGeometries":[{"type":"REGION", "points":[{"x":23, "y":23}, {"x":34, "y":47}, {"x":50, "y":12}]},{"type":"REGION", "points":[{"x":25, "y":28}, {"x":38, "y":45}, {"x":54, "y":15}]}], "operation":"INTERSECT"}

The result returned is as follows:

[

  {

    "operateGeometry": null,

    "result": {

      "image": null,

      "message": null,

      "resultGeometry": {

        "center": {

          "x": 38.3380604288499,

          "y": 31.512426900584796

        },

        "id": 1,

        "partTopo": [

          1,

          1

        ],

        "parts": [

          4,

          6

        ],

        "points": [

          {

            "x": 41.6,

            "y": 30.375

          },

          {

            "x": 44.50292397660819,

            "y": 24.02485380116959

          },

          {

            "x": 45,

            "y": 24

          },

          {

            "x": 41.6,

            "y": 30.375

          },

          {

            "x": 33.270270270270274,

            "y": 34.648648648648646

          },

          {

            "x": 37,

            "y": 39

          },

          {

            "x": 41.6,

            "y": 30.375

          },

          {

            "x": 44.50292397660819,

            "y": 24.02485380116959

          },

          {

            "x": 41.32,

            "y": 24.184

          },

          {

            "x": 33.270270270270274,

            "y": 34.648648648648646

          }

        ],

        "prjCoordSys": null,

        "style": null,

        "type": "REGION"

      },

      "succeed": true

    },

    "sourceGeometry": null

  },

  {

    "operateGeometry": null,

    "result": {

      "image": null,

      "message": null,

      "resultGeometry": {

        "center": {

          "x": 33.11356614915334,

          "y": 31.083629893238435

        },

        "id": 2,

        "partTopo": [

          1,

          1,

          1

        ],

        "parts": [

          5,

          5,

          5

        ],

        "points": [

          {

            "x": 26.8576512455516,

            "y": 27.16725978647687

          },

          {

            "x": 33.270270270270274,

            "y": 34.648648648648646

          },

          {

            "x": 41.32,

            "y": 24.184

          },

          {

            "x": 32.532467532467535,

            "y": 24.623376623376622

          },

          {

            "x": 26.8576512455516,

            "y": 27.16725978647687

          },

          {

            "x": 37.8051948051948,

            "y": 22.25974025974026

          },

          {

            "x": 32.532467532467535,

            "y": 24.623376623376622

          },

          {

            "x": 41.32,

            "y": 24.184

          },

          {

            "x": 43,

            "y": 22

          },

          {

            "x": 37.8051948051948,

            "y": 22.25974025974026

          },

          {

            "x": 26.577405857740587,

            "y": 27.292887029288703

          },

          {

            "x": 33,

            "y": 35

          },

          {

            "x": 33.270270270270274,

            "y": 34.648648648648646

          },

          {

            "x": 26.8576512455516,

            "y": 27.16725978647687

          },

          {

            "x": 26.577405857740587,

            "y": 27.292887029288703

          }

        ],

        "prjCoordSys": null,

        "style": null,

        "type": "REGION"

      },

      "succeed": true

    },

    "sourceGeometry": null

  },

  {

    "operateGeometry": null,

    "result": {

      "image": null,

      "message": null,

      "resultGeometry": {

        "center": {

          "x": 26.97699424006954,

          "y": 24.77631364451448

        },

        "id": 3,

        "partTopo": [

          1,

          1

        ],

        "parts": [

          4,

          7

        ],

        "points": [

          {

            "x": 25,

            "y": 25

          },

          {

            "x": 26.8576512455516,

            "y": 27.16725978647687

          },

          {

            "x": 32.532467532467535,

            "y": 24.623376623376622

          },

          {

            "x": 25,

            "y": 25

          },

          {

            "x": 23,

            "y": 23

          },

          {

            "x": 26.577405857740587,

            "y": 27.292887029288703

          },

          {

            "x": 26.8576512455516,

            "y": 27.16725978647687

          },

          {

            "x": 25,

            "y": 25

          },

          {

            "x": 32.532467532467535,

            "y": 24.623376623376622

          },

          {

            "x": 37.8051948051948,

            "y": 22.25974025974026

          },

          {

            "x": 23,

            "y": 23

          }

        ],

        "prjCoordSys": null,

        "style": null,

        "type": "REGION"

      },

      "succeed": true

    },

    "sourceGeometry": null

  }

]

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

See