| | |
| | | String terrainFile = inPath + File.separator + config.getTerrainFile(); |
| | | |
| | | Dataset dsDem = gdal.Open(terrainTif, gdalconstConstants.GA_ReadOnly); |
| | | ComHelper.Resample(dsDem, null, terrainFile, null, wkt, null, null); |
| | | ComHelper.cutAndResample(dsDem, null, terrainFile, null, wkt, null, null); |
| | | dsDem.delete(); |
| | | |
| | | String landuseFile = inPath + File.separator + config.getLanduseFile(); |
| | | |
| | | Dataset dsLanduse = gdal.Open(landuseTif, gdalconstConstants.GA_ReadOnly); |
| | | ComHelper.Resample(dsLanduse, null, landuseFile, null, wkt, null, null); |
| | | ComHelper.cutAndResample(dsLanduse, null, landuseFile, null, wkt, null, null); |
| | | dsLanduse.delete(); |
| | | |
| | | String stationFile = inPath + File.separator + "Station.tif"; |
| | | Dataset dsStation = gdal.Open(stationTif, gdalconstConstants.GA_ReadOnly); |
| | | ComHelper.Resample(dsStation, null, stationFile, null, wkt, null, null); |
| | | dsStation.delete(); |
| | | if (stationTif != null) { |
| | | String stationFile = inPath + File.separator + "Station.tif"; |
| | | Dataset dsStation = gdal.Open(stationTif, gdalconstConstants.GA_ReadOnly); |
| | | ComHelper.cutAndResample(dsStation, null, stationFile, null, wkt, null, null); |
| | | dsStation.delete(); |
| | | } |
| | | } |
| | | |
| | | public void updateTif(Simu simu, SimuData data2) { |
| | |
| | | String startTime = TimeFormatUtil.formatDate(data.getStartTime()); |
| | | ConfigVo vo = new ConfigVo(terrainFile, landuseFile, terrainFile, rainfallFile, |
| | | saveName, duration, saveFrames, saveMode, startTime); |
| | | vo.getResult().setSave_filter(config.getSaveFilter()); |
| | | String configFile = config.getInPath() + File.separator + data.getInPath() + File.separator + data.getInPath() + ".json"; |
| | | // ComHelper.writeJson(configFile, JSON.toJSONString(vo)); |
| | | mapper.writeValue(new File(configFile), vo); |