wuww
2025-05-06 378a66a369b27ba35dc1d4d1cbddd90b626d7046
src/main/java/com/se/nsl/service/TestService.java
@@ -6,6 +6,7 @@
import com.se.nsl.domain.dto.*;
import com.se.nsl.domain.po.DataPo;
import com.se.nsl.domain.po.PondingPo;
import com.se.nsl.domain.po.SimuData;
import com.se.nsl.domain.vo.BuildingDepthVo;
import com.se.nsl.helper.ComHelper;
import com.se.nsl.helper.GdalHelper;
@@ -50,6 +51,21 @@
    public final static double MAX_X_OFFSET = 0;
    public final static SimpleDateFormat SDF = new SimpleDateFormat("yyyy-MM-dd HH:mm");
    public void test(SimuData data) throws Exception {
        String basePath = config.getInPath() + File.separator + data.getInPath() + File.separator;
        ResultDto dto = new ResultDto(
                data.getInPath(),
                basePath + config.getTerrainFile(),
                basePath + config.getBuildingFile(),
                basePath + config.getWaterPath(),
                basePath + config.getFlowPath(),
                config.getInPath(),
                config.getOutPath(),
                data.getEpsg());
        LayerDto layer = new LayerDto(config.getVer(), data.getEpsg(), config.getSizes());
        process(dto, layer);
    }
    public void test(DataPo data) throws Exception {
        String basePath = config.getInPath() + File.separator + data.getInPath() + File.separator;
@@ -240,8 +256,8 @@
            }
        });*/
        int c = files.size();
        int step = c <= 1 ? 1 : c / 10;
        int c = files.size(), step = files.size() / 10;
        if (step < 1) step = 1;
        for (int i = 0; i < c; i += step) {
            Dataset ds = null;
            try {
@@ -625,8 +641,10 @@
        layer.getWaters().setFiles(null);
        layer.getTerrain().setEpsg(null);
        layer.getExtension().setDiffer(null);
        layer.setWaterUrl("/hls/w" + dto.getOutPath() + ".m3u8");
        layer.setFlowUrl("/hls/f" + dto.getOutPath() + ".m3u8");
        String path = dto.getOutPath().replace(config.getOutPath() + File.separator, "");
        layer.setWaterUrl("/hls/w" + path + ".m3u8");
        layer.setFlowUrl("/hls/f" + path + ".m3u8");
        String json = JSON.toJSONString(layer);
        // String json = JSONUtil.toJsonPrettyStr(layer);