11
13693261870
2024-09-29 057656be19439c26afeb37c76fc7d28fd4474d03
src/main/java/com/se/simu/service/GedbService.java
@@ -218,8 +218,6 @@
        List<GeLayer> layers = getLayers(token, db);
        queryData(token, db, layers);
        createShps(basePath, layers);
        createZoneShp(basePath, data, db.getSpatialReference());
        if (data.getPid() > 0) {
            createFloodShp(basePath, data, db.getSpatialReference());
@@ -256,12 +254,17 @@
    }
    private void createZoneShp(String basePath, DataPo data, SpatialReference sr) {
        String filePath = basePath + File.separator + "";
        ShpHelper.createShp(filePath, sr, data.getMinx(), data.getMiny(), data.getMaxx(), data.getMaxy());
        String filePath = basePath + File.separator + config.getZoneName();
        ShpHelper.createShp(filePath,null, sr, data.getMinx(), data.getMiny(), data.getMaxx(), data.getMaxy());
    }
    private void createFloodShp(String basePath, DataPo data, SpatialReference sr) {
        //
        String filePath = basePath + File.separator + config.getBarrierName();
        Map<String, Object> map = new HashMap<>();
        map.put("height", data.getFloodHeight());
        map.put("type", data.getFloodType());
        ShpHelper.createShp(filePath, map, sr, data.getFloodMinx(), data.getFloodMiny(), data.getFloodMaxx(), data.getFloodMaxy());
    }
    public void copeDem(String token, DataPo data) throws Exception {