| | |
| | | package com.se.simu.utils; |
| | | |
| | | import org.apache.commons.imaging.*; |
| | | import org.gdal.gdal.Band; |
| | | import org.gdal.gdal.Dataset; |
| | | import org.gdal.gdal.Band; |
| | | import org.gdal.gdal.gdal; |
| | | import org.gdal.gdalconst.gdalconstConstants; |
| | | |
| | |
| | | |
| | | public class TiffToRGBUtil { |
| | | public static void main(String[] args) throws Exception{ |
| | | tifToPng("D:\\城市内涝\\sem\\DEM.tif","D:\\城市内涝\\sem\\DEM.png"); |
| | | tifToPng("D:\\城市内涝\\sem\\DEM100.tif","D:\\城市内涝\\sem\\DEM100.png"); |
| | | } |
| | | public static void tifToPng(String tifPath, String pngPath) throws Exception { |
| | | // 注册所有的 GDAL 驱动 |