<spatialanalystJobs_uri>/topologyvalidator[.<format>]
The root directory of the topology validation analysis job resource. By sending a GET request to topologyValidator, you can get the list of the topology validation analysis jobs of the current system. By sending a POST request, you can create a analysis 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/topologyvalidator.rjson
Gets the list of topology validation analysis jobs.
After executing a GET request on the resource, the response entity is a set of topology validation resource descriptions, and the response fields of single resource are as follows:
Field | Type | Description |
id | String | Application ID. |
state | Jobstate | 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": "64e3f1e9_8e4f_42b5_9f98_af204be77880",
"setting": {
"DEFAULT_MASTER_ADRESS": "local[*] ",
"analyst": {
"datasetTopology": "smtiles_Jingjin_New_Region_1",
"inputValidating": "{\"type\":\"udb\",\"info\":[{\"server\":\"F:\\\\4.datastore\\\\Data\\\\data\\\\City - bak - bak\\\\Jingjin.udb\",\"datasetNames\":[\"New_Region_1\"]}]}",
"rule": "RegionContainedByRegion",
"tolerance": ""
},
"appName": "topologyValidator",
"args": [
"--inputSource",
"{\"sliceNum\":20,\"type\":\"udb\",\"info\":[{\"server\":\"F:\\\\4.datastore\\\\Data\\\\data\\\\City - bak - bak\\\\Jingjin.udb\",\"datasetNames\":[\"New_Region\"]}]}",
"--inputValidating",
"{\"type\":\"udb\",\"info\":[{\"server\":\"F:\\\\4.datastore\\\\Data\\\\data\\\\City - bak - bak\\\\Jingjin.udb\",\"datasetNames\":[\"New_Region_1\"]}]}",
"--rule",
"RegionContainedByRegion",
"--output",
"{\"server\":\"192.168.120.21\",\"password\":\"supermap\",\"database\":\"supermap1\",\"datasetName\":\"analystResult_1597348849\",\"blockingWrite\":null,\"type\":\"pg\",\"user\":\"postgres\"}"
],
"contextSetting": null,
"input": {
"datasetInfo": {
"available": true,
"bounds": "Left=-97.1879129784341,Bottom=38.379098407748195,Right=749.938641932885,Top=433.65169599572",
"datasetName": "New_Region",
"datasetType": "REGION",
"epsgCode": -1000,
"name": "smtiles_Jingjin_New_Region",
"readOnly": false,
"type": "UDB",
"url": "F:\\4.datastore\\Data\\data\\City - bak - bak\\Jingjin.udb"
},
"datasetName": "smtiles_Jingjin_New_Region",
"numSlices": 0,
"specField": null
},
"mainClass": "com.supermap.bdt.main.TopologyValidatorMain",
"output": {
"datasetName": "analystResult_1597348849",
"datasourceInfo": {
"alias": "supermap1_pg",
"connect": true,
"dataBase": "supermap1",
"driver": "PostgreSQL ANSI",
"engineType": "POSTGRESQL",
"exclusive": false,
"openLinkTable": false,
"password": "supermap",
"readOnly": false,
"server": "192.168.120.21",
"user": "postgres"
},
"outputPath": "F:\\1.package\\20171021\\supermap_iserver_901_15420_4680_win64_zip\\webapps\\iserver\\processingResultData\\Analyst\\64e3f1e9_8e4f_42b5_9f98_af204be77880\\topology.smwu",
"type": "pg"
},
"serviceInfo": {
"targetDataPath": "F:\\1.package\\20171021\\supermap_iserver_901_15420_4680_win64_zip\\webapps\\iserver\\processingResultData\\Analyst\\64e3f1e9_8e4f_42b5_9f98_af204be77880\\topology.smwu",
"targetServiceInfos": [
{
"serviceAddress": "http://supermapiserver:8090/iserver/services/map-topology22/rest",
"serviceType": "RESTMAP"
},
{
"serviceAddress": "http://supermapiserver:8090/iserver/services/data-topology22/rest",
"serviceType": "RESTDATA"
}
]
},
"serviceRoot": "http://supermapiserver:8090/iserver/services/",
"sparkLogFile": null
},
"state": {
"elapsedTime": 12651,
"endState": true,
"endTime": 1508833694778,
"errorMsg": null,
"errorStackTrace": null,
"publisherelapsedTime": 8446,
"runState": "FINISHED",
"startTime": 1508833669915
}
}
Creates a task of topology validation analysis job.
Parameters passed in the request body should contain:
Name | Type | Description |
input | FileCSVInputDataSetting DatasetInputDataSetting |
[Required] Supports two input ways: 1. datasetName: dataset name. Used when the data to be analyzed in the Data Catalog Service is point type, including data imported through Data Catalog Service, registered data in iServer and point datasets stored in DataStore.2. Input file path and the related information. When the data to be analyzed does not belong to Data Catalog Service, you need use this method. Supported file formats: csv file, udb file, pg database, index file stored in hdfs. For detailed parameters' description, see: Big data analysis input parameter settings. |
analyst | TopologyValidatorAnalystSetting | [Required] Analysis settings. You need to specify:
|
output | FileSystemOutputSetting DatabaseOutputSetting |
[Optional] The output of analysis result. Supported output formats: local udb file, database (pg, mongodb). For detailed parameter settings, see: Big data analysis input parameter settings. |
Execute a POST request on topologyValidator resource to create a topology validation analysis job: http://supermapiserver:8090/iserver/services/distributedanalyst/rest/v1/jobs/spatialanalyst/topologyvalidator.rjson with the following request body which inputs registered dataset name:
{
"input": {
"datasetName": "samples_processing_newyorkZone_R"
},
"analyst": {
"rule": "REGIONNOOVERLAPWITH",
"datasetTopology": "samples_processing_singleRegion_R",
"tolerance": ""
}
}
then the returned resource in rjson format is as follows:
{
"newResourceID": "6d3baaab_1486_4a6d_b90d_f0ca51132dc2",
"newResourceLocation":"http://supermapiserver:8090/iserver/services/distributedanalyst/rest/v1/jobs/spatialanalyst/topologyvalidator/6d3baaab_1486_4a6d_b90d_f0ca51132dc2",
"postResultType": "CreateChild",
"succeed": true
}
Execute a POST request on topologyValidator resource to create a topology validation analysis job: http://supermapiserver:8090/iserver/services/distributedanalyst/rest/v1/jobs/spatialanalyst/topologyvalidator.rjson with the following request body which specifies data stored in PostgreSQL database:
{
"input": {
"datasetInfo": {
"type": "REGION",
"name": "newyorkZone_R_1645948803",
"datasourceConnectionInfo": {
"engineType": "POSTGRESQL",
"dataBase": "supermap",
"password": "supermap",
"user": "postgres",
"server": "192.168.120.21"
}
}
},
"analyst": {
"rule": "REGIONNOOVERLAPWITH",
"datasetTopology": "samples_processing_singleRegion_R",
"tolerance": "0.001"
}
}
then the returned resource in rjson format is as follows:
{
"newResourceID": "04483bb2_e9b1_4fe3_aa3d_39c4fdb84416",
"newResourceLocation": "http://supermapiserver:8090/iserver/services/distributedanalyst/rest/v1/jobs/spatialanalyst/topologyvalidator/04483bb2_e9b1_4fe3_aa3d_39c4fdb84416",
"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 topologyValidator 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 topologyValidator resource supports the <format> representation.