<spatialanalystJobs_uri>/vectorclip[.<format>]
The root directory of the vector clip job resource. By sending a GET request to vectorClip, you can get the list of the vector clip jobs of the current system. By sending a POST request, you can create a vector clip task.
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/distributedanalyst/rest/v1/jobs/spatialanalyst/vectorClip.rjson
Gets the list of vector clip jobs.
After executing a GET request on the resource, the response entity is a set of vector clip resource descriptions, and the response fields of single resource are as follows:
Field | Type | Description |
id | String | Application ID. |
state | SparkJobState | The status of the task. Including execution status, start time, time consuming, and so on. |
setting | SparkJobSetting | Lists the detailed information of task configuration. |
By executing a GET request on this resource, the returned response result in rjosn format is as follows:
[{
"id": "a4d3f1c0_bd7e_4c3d_a63e_b02f76a293a9",
"setting": {
"DEFAULT_MASTER_ADRESS": "local[*] ",
"analyst": {
"datasetOverlay": "New_Region",
"inputOverlay": "F:\\20170608\\onere\\onere.udb",
"mode": "clip",
"numSlices": "20"
},
"appName": "vectorClip",
"args": [
"--inputSource",
"F:\\20170608\\onere\\onere.udb",
"--datasetSource",
"zone",
"--numSlices",
"20",
"--inputOverlay",
"F:\\20170608\\onere\\onere.udb",
"--datasetOverlay",
"New_Region",
"--mode",
"clip",
"--outputResult",
"F:\\20170608\\supermap_iserver_900_15008_4414_win64_zip\\webapps\\iserver\\processingResultData\\Analyst\\udbs\\fdae17ca-782b-4729-83d0-bfefb573377d",
"--datasetResult",
"analystResult"
],
"contextSetting": null,
"input": {
"datasetSource": "zone",
"inputSource": "F:\\20170608\\onere\\onere.udb"
},
"mainClass": "com.supermap.bsp.main.vectorClipMain",
"output": {
"cacheName": null,
"cacheType": null,
"datasetResult": "analystResult",
"outputResult": "F:\\20170608\\supermap_iserver_900_15008_4414_win64_zip\\webapps\\iserver\\processingResultData\\Analyst\\udbs\\fdae17ca-782b-4729-83d0-bfefb573377d"
},
"serviceInfo": {
"targetDataPath": "F:\\20170608\\supermap_iserver_900_15008_4414_win64_zip\\webapps\\iserver\\processingResultData\\Analyst\\a4d3f1c0_bd7e_4c3d_a63e_b02f76a293a9",
"targetServiceInfos": [
{
"serviceAddress": "http://localhost:8090/iserver/services/map-vectorClip2/rest",
"serviceType": "RESTMAP"
},
{
"serviceAddress": "http://localhost:8090/iserver/services/data-vectorClip2/rest",
"serviceType": "RESTDATA"
}
]
},
"serviceRoot": "http://localhost:8090/iserver/services/"
},
"state": {
"elapsedTime": 12091,
"endState": true,
"endTime": 1496911750621,
"errorMsg": null,
"errorStackTrace": null,
"publisherelapsedTime": 2804,
"runState": "FINISHED",
"startTime": 1496911733481
}
}]
Creates a vector clip job.
Parameters passed in the request body should contain:
Name | Type | Definition |
input [Required] |
DatasetInputDataSetting |
|
FileCSVInputDataSetting |
|
|
analyst |
OverlayAnalystGeoAnalystSetting | [Required] Analysis settings. You need to specify:
|
output [Optional] |
FileSystemOutputSetting |
|
DatabaseOutputSetting |
|
|
RDDOutputSetting |
|
Execute a POST request on vectorClip resource to create a vector clip analysis job: http://supermapiserver:8090/iserver/services/distributedanalyst/rest/v1/jobs/spatialanalyst/vectorclip.rjson with the following request body which inputs registered dataset name:
{
"input": {
"datasetName": "samples_processing_newyorkZone_R"
},
"analyst": {
"datasetVectorClip": "samples_processing_singleRegion_R",
"mode": "clip"
}
}
then the returned resource in rjson format is as follows:
{
"newResourceID": "f88cd129_a989_4f6c_a8e0_4f9d225f6b54",
"newResourceLocation": "http://supermapiserver:8090/iserver/services/distributedanalyst/rest/v1/jobs/spatialanalyst/vectorclip/f88cd129_a989_4f6c_a8e0_4f9d225f6b54",
"postResultType": "CreateChild",
"succeed": True
}
Execute a POST request on vectorClip resource to create a vector clip job: http://supermapiserver:8090/iserver/services/distributedanalyst/rest/v1/jobs/spatialanalyst/vectorclip.rjson with the following request body which specifies data stored in PostgreSQL database:
{
"input": {
"datasetInfo": {
"type": "REGION",
"name": "zone",
"datasourceConnectionInfo": {
"engineType": "POSTGRESQL",
"dataBase": "supermap4",
"password": "supermap",
"user": "postgres",
"server": "192.168.120.49"
}
}
},
"analyst":{
"inputVectorClip": "{\"type\":\"udb\",\"info\":[{\"server\":\"D:/data/zone.udb\",\"datasetNames\":[\"New_Region\"]}],\"attributeFilter\":\"SMID=1\"}",
"mode":"clip"
}
}
then the returned resource in rjson format is as follows:
{
"newResourceID": "b53a553f_a099_4baf_bc30_e68c41d08cf0",
"newResourceLocation": "http://supermapiserver:8090/iserver/services/distributedanalyst/rest/v1/jobs/spatialanalyst/vectorclip/b53a553f_a099_4baf_bc30_e68c41d08cf0",
"postResultType": "CreateChild",
"succeed": True
}
Execute a POST request on vectorClip resource to create a vector clip job: http://supermapiserver:8090/iserver/services/distributedanalyst/rest/v1/jobs/spatialanalyst/vectorclip.rjson with the following request body which contains a geometry and its buffer as the clip dataset:
{
"input": {
"datasetName": "samples_processing_newyorkZone_R"
},
"analyst": {
"geometryClip": "{\"type\":\"REGION\",\"points\":[{\"x\":-73.96,\"y\":40.78},{\"x\":-73.90,\"y\":40.78},{\"x\":-73.95,\"y\":40.742},{\"x\":-73.90,\"y\":40.747}]}",
"bufferAnalystParameter": {
"endType": "ROUND",
"leftDistance": {
"value": "10"
},
"rightDistance": {
"value": "10"
},
"semicircleLineSegment": "10",
"radiusUnit": "METER"
},
"mode": "clip"
}
}
then the returned resource in rjson format is as follows:
{
"newResourceID": "4197351c_cfe6_43fe_83a8_e97cf1327cf3",
"newResourceLocation": "http://supermapiserver:8090/iserver/services/distributedanalyst/rest/v1/jobs/spatialanalyst/vectorclip/4197351c_cfe6_43fe_83a8_e97cf1327cf3",
"postResultType": "CreateChild",
"succeed": True
}
Execute a POST request on vectorClip resource to create a vector clip job: http://supermapiserver:8090/iserver/services/distributedanalyst/rest/v1/jobs/spatialanalyst/vectorclip.json with the following request body to output the result into distributed memory:
{
"input": {
"datasetName": "sample_processing_newyorkZone_R"
},
"analyst": {
"datasetVectorClip": "sample_processing_singleRegion_R",
"mode": "clip"
},
"output": {
"type": "RDD",
"buildPyramid": false
}
}
then the returned operation result in rjson format is as follows:
{
"newResourceID": "5d418de6_52d1_4c1c_acf7_0de9b145aa75",
"newResourceLocation":"http://192.168.120.46:8090/iserver/services/distributedanalyst/rest/v1/jobs/spatialanalyst/vectorclip/5d418de6_52d1_4c1c_acf7_0de9b145aa75",
"postResultType": "CreateChild",
"succeed": true
}
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 vectorClip resource exists, or if the user has the authority to access it. By executing an HEAD request with a .<format> URI, you can quickly determine whether the vectorClip resource supports the <format> representation.