|
|
|
@ -422,7 +422,11 @@
|
|
|
|
|
function splitMultiPolygons(str) {
|
|
|
|
|
|
|
|
|
|
let hadnlerStr = str.replace(",MULTIPOLYGON","-MULTIPOLYGON");
|
|
|
|
|
|
|
|
|
|
hadnlerStr = str.replace(",POLYGON","-POLYGON");
|
|
|
|
|
|
|
|
|
|
let result = hadnlerStr.split("-");
|
|
|
|
|
|
|
|
|
|
// 移除开头的 "MULTIPOLYGON" 和多余的括号
|
|
|
|
|
// const cleanedStr = str.replace(/^MULTIPOLYGON\(/, '').replace(/\)+$/, '');
|
|
|
|
|
|
|
|
|
@ -456,9 +460,12 @@
|
|
|
|
|
|
|
|
|
|
splitTubanBackYuan(calAreaParams).then(res=>{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(!res.gengdituban){
|
|
|
|
|
message.warning("分割数据为空");
|
|
|
|
|
emit("handlerSplitResultEmpty");
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let geojson = {
|
|
|
|
@ -470,11 +477,10 @@
|
|
|
|
|
let wktArray = splitMultiPolygons(res.gengdituban);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(wktArray.length>0){
|
|
|
|
|
|
|
|
|
|
wktArray?.forEach((item,index)=>{
|
|
|
|
|
console.log("item",item);
|
|
|
|
|
|
|
|
|
|
let feature = {
|
|
|
|
|
"type": "Feature",
|
|
|
|
|
"properties": {
|
|
|
|
|