更新要素。
修改注意事项:
filter
进行更新的话,就是批量更新,无法支持更新geometry
:
features
的类型为FeatureCollection
, 则只使用第一个feature
批量更新filter过滤得到的要素,传递的多余的无效features
的类型为Feature
, 则直接使用此feature
的属性批量更新filter过滤得到的要素Feature
的内容ids
更新,存在如下俩种情况(下面俩种情况都会忽略其中传的kid 或 fid
属性:
features
的类型为FeatureCollection
, 则传递的feature
数组大小与ids的数量必须相等,否则更新失败;features
的类型为Feature
, 则只会更新属性,且批量更新 ids
指定的要素的属性;ids
或filter
的情况下,如果下面传递的feature
的属性里面没必须存在kid 或 fid
,则忽略此feature
,否则更新指定了具体id的要素;filter
的优先级最高,ids
的次之;successCount
代表成功的项。{
"Request-Method":"PUT",
"datasourceName":"china",
"datasetName":"road",
"filter":{filter object},
"features": {FeatureCollection or Feature GeoJson object},
"geoSRS": "EPSG:4490"
}
{
"Request-Method": "put",
"datasourceName": "KQSpatialDB2403041717",
"datasetName": "XZQ",
"ids": [
9,
10
],
"features": {
"type": "Feature", // 只传递了一个要素,取其属性批量更新9和10的属性
"properties": {
"BSM": "34172112143436",
"YSDM": "1000600130",
"XZQDM": "341732324006",
"XZQMC": "测试修改9信息"
}
}
}
{
"Request-Method": "put",
"datasourceName": "KQSpatialDB2403041717",
"datasetName": "XZQ",
"ids": [
9,
5,
4
],
"features": {
"type": "FeatureCollection",
"features": [ // 此大小与ids大小相等
{
"properties": {
"BSM": "34172112143436",
"YSDM": "1000600130",
"XZQDM": "341732324006",
"XZQMC": "测试修改9信息"
},
"geometry": {
"coordinates": [
[
[
[
39536059.092669,
3347924.042427
],
[
39536685.46414,
3348924.042427
],
[
39536685.46414,
3347597.670955
],
[
39536059.092669,
3347597.670955
],
[
39536059.092669,
3347924.042427
]
]
]
],
"type": "MultiPolygon"
}
},
{
"properties": {
"BSM": "341721121000000006",
"YSDM": "1000600105",
"XZQDM": "34172113222",
"XZQMC": "修改5测试"
}
},
{
"properties": {
"XZQMC": "修改4geomtry"
},
"geometry": {
"coordinates": [
[
[
[
39536029.092669,
3350562.042427
],
[
39537542.46414,
3350562.042427
],
[
39537542.46414,
3349404.670955
],
[
39536029.092669,
3349404.670955
],
[
39536029.092669,
3350562.042427
]
]
]
],
"type": "MultiPolygon"
}
}
]
}
}
{
"Request-Method": "put",
"datasourceName": "KQSpatialDB2403041717",
"datasetName": "XZQ",
"features": {
"type": "FeatureCollection",
"features": [
{
"properties": {
"kid": "9",
"BSM": "34172112143436",
"YSDM": "1000600130",
"XZQDM": "341732324006",
"XZQMC": "测试修改9信息"
},
"geometry": {
"coordinates": [
[
[
[
39536059.092669,
3347924.042427
],
[
39536685.46414,
3348924.042427
],
[
39536685.46414,
3347597.670955
],
[
39536059.092669,
3347597.670955
],
[
39536059.092669,
3347924.042427
]
]
]
],
"type": "MultiPolygon"
}
},
{
"properties": {
"kid": 5,
"BSM": "341721121000000006",
"YSDM": "1000600105",
"XZQDM": "34172113222",
"XZQMC": "修改5测试"
}
},
{
"properties": {
// "kid": 4, 如果这里不指定kid的话,则忽略此传递
"XZQMC": "修改4geomtry"
},
"geometry": {
"coordinates": [
[
[
[
39536029.092669,
3350562.042427
],
[
39537542.46414,
3350562.042427
],
[
39537542.46414,
3349404.670955
],
[
39536029.092669,
3349404.670955
],
[
39536029.092669,
3350562.042427
]
]
]
],
"type": "MultiPolygon"
}
}
]
}
}