| | |
| | | if (null == ds || 0 == ds.getRasterCount()) return; |
| | | |
| | | createWaterPng(dto, ds, layer, layer.getWaters().getData().get(i)); |
| | | copyWaterTif(dto, ds, layer.getWaters().getData().get(i)); |
| | | } finally { |
| | | if (null != ds) ds.delete(); |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | private static void copyWaterTif(ResultDto dto, Dataset ds, long ticks) { |
| | | String source = ds.GetDescription(); |
| | | String target = dto.getOutPath() + File.separator + "waters" + File.separator + ticks + File.separator + "water.tif"; |
| | | FileUtil.copyFile(source, target); |
| | | } |
| | | |
| | | private static String getNameWithExt(String file) { |
| | | return file.substring(file.lastIndexOf(File.separator) + 1, file.lastIndexOf(".")); |
| | | } |