<spatialanalystJobs_uri>/featurejoin[.<format>]
The root directory of the feature join analysis job resource. By sending a GET request to featureJoin, you can get the list of the feature join 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/featurejoin.rjson
Gets the list of feature join analysis jobs.
After executing a GET request on the resource, the response entity is a set of feature join 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": "600b8484_92ac_49df_89c9_6557c2113a2b",
"setting": {
"DEFAULT_MASTER_ADRESS": "local[*] ",
"analyst": {
"attributeMode": "NotEqual",
"attributeRelationship": "BSM",
"datasetFeatureJoin": "smtiles_FeatureJoin_XZQ",
"inputJoin": "{\"specFields\":[\"SMID\",\"ST\",\"ET\"],\"type\":\"udb\",\"info\":[{\"server\":\"C:\\\\Users\\\\Administrator\\\\Desktop\\\\featurejoin\\\\data\\\\FeatureJoin.udb\",\"datasetNames\":[\"XZQ\"]}]}",
"joinFields": "KZMJ",
"joinOperation": "JoinOneToMany",
"resultFieldNames": null,
"spatialNearDistance": "1",
"spatialNearDistanceUnit": "kilometer",
"spatialRelationship": "near",
"specFields": "SMID,ST,ET",
"summaryFields": null,
"summaryMode": null,
"temporalNearDistance": "1",
"temporalNearDistanceUnit": "hour",
"temporalRelationship": "near"
},
"appName": "featureJoinAnalyst",
"args": [
"--inputTarget",
"{\"sliceNum\":20,\"specFields\":[\"SMID\",\"ST\",\"ET\"],\"type\":\"udb\",\"info\":[{\"server\":\"C:\\\\Users\\\\Administrator\\\\Desktop\\\\featurejoin\\\\data\\\\FeatureJoin.udb\",\"datasetNames\":[\"DLTB\"]}]}",
"--inputJoin",
"{\"specFields\":[\"SMID\",\"ST\",\"ET\"],\"type\":\"udb\",\"info\":[{\"server\":\"C:\\\\Users\\\\Administrator\\\\Desktop\\\\featurejoin\\\\data\\\\FeatureJoin.udb\",\"datasetNames\":[\"XZQ\"]}]}",
"--joinOperation",
"JoinOneToMany",
"--joinFields",
"KZMJ",
"--spatialRelationship",
"near",
"--spatialNearDistance",
"1",
"--spatialNearDistanceUnit",
"kilometer",
"--temporalRelationship",
"near",
"--temporalNearDistance",
"1",
"--temporalNearDistanceUnit",
"hour",
"--attributeRelationship",
"[BSM,NotEqual]",
"--output",
"{\"server\":\"192.168.120.21\",\"password\":\"supermap\",\"database\":\"supermap\",\"datasetName\":\"analystResult_635774468\",\"blockingWrite\":null,\"type\":\"pg\",\"user\":\"postgres\"}"
],
"contextSetting": null,
"input": {
"datasetInfo": {
"available": true,
"bounds": "Left=3.8385244968896E7,Bottom=3943626.398848,Right=3.8390388268116E7,Top=3946482.966666",
"datasetName": "DLTB",
"datasetType": "REGION",
"epsgCode": 2362,
"name": "smtiles_FeatureJoin_DLTB",
"readOnly": false,
"type": "UDB",
"url": "C:\\Users\\Administrator\\Desktop\\featurejoin\\data\\FeatureJoin.udb"
},
"datasetName": "smtiles_FeatureJoin_DLTB",
"numSlices": 0,
"specField": "SMID,ST,ET"
},
"mainClass": "com.supermap.bdt.main.FeatureJoinMain",
"output": {
"datasetName": "analystResult_635774468",
"datasourceInfo": {
"alias": "supermap_pg",
"connect": true,
"dataBase": "supermap",
"driver": "PostgreSQL ANSI",
"engineType": "POSTGRESQL",
"exclusive": false,
"openLinkTable": false,
"password": "supermap",
"readOnly": false,
"server": "192.168.120.21",
"user": "postgres"
},
"outputPath": "F:\\1.package\\20171025\\supermap_iserver_901_15425_4681_win64_zip\\webapps\\iserver\\processingResultData\\Analyst\\600b8484_92ac_49df_89c9_6557c2113a2b\\featureJoinAnalyst.smwu",
"type": "pg"
},
"serviceInfo": {
"targetDataPath": "F:\\1.package\\20171025\\supermap_iserver_901_15425_4681_win64_zip\\webapps\\iserver\\processingResultData\\Analyst\\600b8484_92ac_49df_89c9_6557c2113a2b\\featureJoinAnalyst.smwu",
"targetServiceInfos": [
{
"serviceAddress": "http://supermapiserver:8090/iserver/services/map-featureJoinAnalyst13/rest",
"serviceType": "RESTMAP"
},
{
"serviceAddress": "http://supermapiserver:8090/iserver/services/data-featureJoinAnalyst13/rest",
"serviceType": "RESTDATA"
}
]
},
"serviceRoot": "http://supermapiserver:8090/iserver/services/",
"sparkLogFile": null
},
"state": {
"elapsedTime": 18188,
"endState": true,
"endTime": 1509007481687,
"errorMsg": null,
"errorStackTrace": null,
"publisherelapsedTime": 2840,
"runState": "FINISHED",
"startTime": 1509007454998
}
}
Creates a feature join analysis job.
Parameters passed in the request body should contain:
Name | Type | Description |
input | FileCSVInputDataSetting DatasetInputDataSetting |
[The following parameters are required if not specified] Supports two input ways: 1. datasetName: dataset name. Used when the data to be analyzed is point dataset provided by the Data Catalog Service, 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. For detailed parameters' description, see: Big data analysis input parameter settings. |
analyst | FeatureJoinAnalystSetting | [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 featureJoin resource to create a feature join analysis job: http://supermapiserver:8090/iserver/services/distributedanalyst/rest/v1/jobs/spatialanalyst/featurejoin .rjson with the following request body which specifies the registered dataset name:
{
"input": {
"datasetName": "smtiles_FeatureJoin_DLTB"
},
"analyst": {
"datasetFeatureJoin": "smtiles_FeatureJoin_XZQ",
"joinOperation": "JOINONETOONE",
"joinFields": "KZMJ",
"mappingParameters": {
"numericPrecision": 2
},
"spatialRelationship": "NEAR",
"spatialNearDistance": "1",
"spatialNearDistanceUnit": "KILOMETER",
"tolerance": "0.0001",
"summaryFields": "KZMJ",
"summaryMode": "max"
}
}
then the returned resource in rjson format is as follows:
{
"postResultType": "CreateChild",
"newResourceID": "a39624cf_9a74_484f_a334_c1da1ae71811",
"succeed": true,
"newResourceLocation": "http://supermapiserver:8090/iserver/services/distributedanalyst/rest/v1/jobs/spatialanalyst/featurejoin/a39624cf_9a74_484f_a334_c1da1ae71811"
}
Execute a POST request on featureJoin resource to create a feature join analysis job: http://supermapiserver:8090/iserver/services/distributedanalyst/rest/v1/jobs/spatialanalyst/featurejoin .rjson with the following request body which specifies data stored in PostgreSQL database:
{
"input": {
"datasetName": "DLTB_522316171",
"datasourceConnectionInfo": {
"engineType": "POSTGRESQL",
"dataBase": "supermap",
"password": "supermap",
"user": "postgres",
"server": "192.168.120.21"
}
},
"analyst": {
"datasetFeatureJoin": "XZQ_522316171",
"joinOperation": "JOINONETOONE",
"joinFields": "KZMJ",
"mappingParameters": {
"numericPrecision": null
},
"spatialRelationship": "NEAR",
"spatialNearDistanceUnit": "KILOMETER"
}
}
then the returned resource in rjson format is as follows:
{
"postResultType": "CreateChild",
"newResourceID": "8a532ad1_45df_4ea6_8a66_e79553117f42",
"succeed": true,
"newResourceLocation": "http://supermapiserver:8090/iserver/services/distributedanalyst/rest/v1/jobs/spatialanalyst/featurejoin/8a532ad1_45df_4ea6_8a66_e79553117f42"
}
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 featureJoin 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 featureJoin resource supports the <format> representation.