| | |
| | | |
| | | private List<Integer> sizes; |
| | | |
| | | private String terrainFile; |
| | | |
| | | private String buildingFile; |
| | | |
| | | private String waterPath; |
| | | |
| | | private String flowPath; |
| | | |
| | | public String getVer() { |
| | | return ver; |
| | | } |
| | |
| | | public void setSizes(List<Integer> sizes) { |
| | | this.sizes = sizes; |
| | | } |
| | | |
| | | public String getTerrainFile() { |
| | | return terrainFile; |
| | | } |
| | | |
| | | public void setTerrainFile(String terrainFile) { |
| | | this.terrainFile = terrainFile; |
| | | } |
| | | |
| | | public String getBuildingFile() { |
| | | return buildingFile; |
| | | } |
| | | |
| | | public void setBuildingFile(String buildingFile) { |
| | | this.buildingFile = buildingFile; |
| | | } |
| | | |
| | | public String getWaterPath() { |
| | | return waterPath; |
| | | } |
| | | |
| | | public void setWaterPath(String waterPath) { |
| | | this.waterPath = waterPath; |
| | | } |
| | | |
| | | public String getFlowPath() { |
| | | return flowPath; |
| | | } |
| | | |
| | | public void setFlowPath(String flowPath) { |
| | | this.flowPath = flowPath; |
| | | } |
| | | } |
| | |
| | | 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; |
| | |
| | | "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 { |
| | | 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 { |
| | | LayerDto layer = new LayerDto(config.getVer(), 4528, config.getSizes()); |
| | | |
| | | copeTerrain(dto, layer); |
| | | copeBuilding(dto, layer); |
| | |
| | | uwService.copeDrainFiles(); |
| | | |
| | | update(simu, 9, null); |
| | | //resultService.process(data); |
| | | resultService.process(data); |
| | | |
| | | //update(simu, 10, "完成"); |
| | | update(simu, 10, "完成"); |
| | | } catch (Exception ex) { |
| | | log.error(ex.getMessage(), ex); |
| | | update(simu, -10, ex.getMessage()); |
| | |
| | | flowUnits: CMS |
| | | solverBat: D:\simu\uwsolver\run_solver.bat |
| | | sizes: 64,128,256,512,1024,2048 |
| | | # 输出文件 |
| | | terrainFile: terrain.tif |
| | | buildingFile: buildings.tif |
| | | waterPath: waters |
| | | flowPath: flows |