1
13693261870
2024-10-16 dbd56c635c64d92dd23c7f4c9227f84f77bbd82b
src/main/java/com/se/simu/service/ResultService.java
@@ -6,6 +6,7 @@
import com.se.simu.domain.dto.ExtensionDto;
import com.se.simu.domain.dto.LayerDto;
import com.se.simu.domain.dto.ResultDto;
import com.se.simu.domain.po.DataPo;
import com.se.simu.helper.GdalHelper;
import lombok.extern.slf4j.Slf4j;
import org.gdal.gdal.Band;
@@ -39,24 +40,22 @@
    public final static double MAX_X_OFFSET = 0.002;
    public String test() throws Exception {
    public void process(DataPo data) throws Exception {
        String basePath = config.getInPath() + File.separator + data.getInPath() + File.separator;
        ResultDto dto = new ResultDto(
                "202409",
                "D:\\simu\\input\\tongzhou-local-mesh2-terrain.tif",
                "D:\\simu\\input\\tongzhou-local-mesh2-buildings.tif",
                "D:\\simu\\input\\waters",
                "D:\\simu\\input\\flows",
                "D:\\simu\\out",
                data.getInPath(),
                basePath + config.getTerrainFile(),
                basePath + config.getBuildingFile(),
                basePath + config.getWaterPath(),
                basePath + config.getFlowPath(),
                config.getOutPath(),
                "");
        process(dto);
        return "OK";
        LayerDto layer = new LayerDto(config.getVer(), data.getEpsg(), config.getSizes());
        process(dto, layer);
    }
    public void process(ResultDto dto) throws Exception {
    private void process(ResultDto dto, LayerDto layer) throws Exception {
        try {
            LayerDto layer = new LayerDto(config.getVer(), 4528, config.getSizes());
            copeTerrain(dto, layer);
            copeBuilding(dto, layer);
            copeWater(dto, layer);