1
13693261870
2024-10-16 dbd56c635c64d92dd23c7f4c9227f84f77bbd82b
src/main/java/com/se/simu/service/GedbService.java
@@ -1,6 +1,5 @@
package com.se.simu.service;
import cn.hutool.core.collection.ListUtil;
import cn.hutool.core.io.FileUtil;
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
@@ -233,16 +232,20 @@
        List<String> bsm = getValues(point, "bsm");
        List<String> bsm2 = new ArrayList<>(bsm);
        List<String> qdbsm = getValues(line, "qdbsm");
        List<String> qdbsm2 = new ArrayList<>(qdbsm);
        List<String> zdbsm = getValues(line, "zdbsm");
        List<String> zdbsm2 = new ArrayList<>(zdbsm);
        bsm.removeAll(qdbsm);
        bsm.removeAll(zdbsm);
        qdbsm.removeAll(bsm2);
        zdbsm.removeAll(bsm2);
        removeValues(point, "bsm", bsm);
        removeValues(line, "qdbsm", qdbsm);
        removeValues(line, "zdbsm", zdbsm);
        qdbsm = getValues(line, "qdbsm");
        zdbsm = getValues(line, "zdbsm");
        bsm.removeAll(qdbsm);
        bsm.removeAll(zdbsm);
        removeValues(point, "bsm", bsm);
        GeLayer juncLayer = new GeLayer(point, filterLayerData(point.getData()));
        juncLayer.setName("集水点");
@@ -290,7 +293,7 @@
    private void createShps(String basePath, List<GeLayer> layers) throws Exception {
        for (GeLayer layer : layers) {
            String path = basePath + File.separator + layer.getShpName();
            if (!ShpHelper.createShp(path, layer)) {
            if (layer.getData().isEmpty() || !ShpHelper.createShp(path, layer)) {
                throw new Exception(layer.getName() + ",创建ShapeFile文件失败!");
            }
        }