| | |
| | | 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; |
| | |
| | | |
| | | public final static double MAX_X_OFFSET = 0.002; |
| | | |
| | | public String test() throws Exception { |
| | | public String testResuslt() throws Exception { |
| | | ResultDto dto = new ResultDto( |
| | | "202409", |
| | | "D:\\simu\\input\\tongzhou-local-mesh2-terrain.tif", |
| | |
| | | "D:\\simu\\input\\flows", |
| | | "D:\\simu\\out", |
| | | ""); |
| | | process(dto); |
| | | LayerDto layer = new LayerDto(config.getVer(), 4528, config.getSizes()); |
| | | process(dto, layer); |
| | | |
| | | return "OK"; |
| | | } |
| | | |
| | | public void process(ResultDto dto) throws Exception { |
| | | try { |
| | | LayerDto layer = new LayerDto(config.getVer(), 4528, config.getSizes()); |
| | | public void process(DataPo 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.getOutPath(), |
| | | ""); |
| | | LayerDto layer = new LayerDto(config.getVer(), data.getEpsg(), config.getSizes()); |
| | | process(dto, layer); |
| | | } |
| | | |
| | | private void process(ResultDto dto, LayerDto layer) throws Exception { |
| | | try { |
| | | copeTerrain(dto, layer); |
| | | copeBuilding(dto, layer); |
| | | copeWater(dto, layer); |