public void close() throws IOException { geotiff.close(); }
public void close() throws IOException { geotiff.close(); }
public void close() throws IOException { geotiff.close(); }
/** * test */ public static void main(String[] argv) { try { GeoTiff geotiff = new GeoTiff("/home/yuanho/tmp/ilatlon_float.tif"); //GeoTiff geotiff = new GeoTiff("/home/yuanho/tmp/maxtemp.tif"); //GeoTiff geotiff = new GeoTiff("/home/yuanho/tmp/test.tif"); //GeoTiff geotiff = new GeoTiff("C:/data/geotiff/c41078a1.tif"); //GeoTiff geotiff = new GeoTiff("C:/data/geotiff/L7ETMbands147.tif"); //GeoTiff geotiff = new GeoTiff("data/blueTest.tiff"); /*GeoTiff geotiff = new GeoTiff("data/testWrite.tiff"); geotiff.addTag( new IFDEntry(Tag.SampleFormat, FieldType.SHORT, 3)); geotiff.write(); geotiff.close(); geotiff = new GeoTiff("data/testWrite.tiff"); */ geotiff.read(); geotiff.showInfo(System.out); geotiff.testReadData(); geotiff.close(); } catch (Exception e) { e.printStackTrace(); } }
public static void main(String args[]) throws IOException { String fileOut = "/home/yuanho/Download/F15_s.tmp_new.tif"; //String fileOut = "/home/yuanho/tmp/tmbF.tif"; //LatLonPointImpl p1 = new LatLonPointImpl(38.0625, -80.6875); //LatLonPointImpl p2 = new LatLonPointImpl(47.8125, -67.0625); LatLonPointImpl p1 = new LatLonPointImpl(-5, -52.0); LatLonPointImpl p2 = new LatLonPointImpl(25, -20.0); LatLonRect llr = new LatLonRect(p1, p2); GeoTiffWriter2 writer = new GeoTiffWriter2(fileOut); //writer.writeGrid("radar.nc", "noice_wat", 0, 0, true); //writer.writeGrid("dods://www.cdc.noaa.gov/cgi-bin/nph-nc/Datasets/coads/2degree/enh/cldc.mean.nc?lat[40:1:50],lon[70:1:110],time[2370:1:2375],cldc[2370:1:2375][40:1:50][70:1:110]", "cldc", 0, 0,true); //writer.writeGrid("dods://www.cdc.noaa.gov/cgi-bin/nph-nc/Datasets/noaa.oisst.v2/sst.mnmean.nc", "sst", 0, 0,false); //writer.writeGrid("2003091116_ruc2.nc", "P_sfc", 0, 0, false); //writer.writeGrid("/home/yuanho/dev/netcdf-java/geotiff/2003072918_avn-x.nc", "P_sfc", 0, 0, false,llr); //writer.writeGrid("/home/yuanho/tmp/NE_1961-1990_Yearly_Max_Temp.nc", "tmax", 0, 0, false, llr); // writer.writeGrid("/home/yuanho/tmp/TMB.nc", "MBchla", 0, 0, false, llr); writer.writeGrid("/home/yuanho/GIS/DataAndCode/F15_s.tmp", "infraredImagery", 0, 0, true, llr); writer.close(); // read it back in GeoTiff geotiff = new GeoTiff(fileOut); geotiff.read(); System.out.println("geotiff read in = " + geotiff.showInfo()); //geotiff.testReadData(); geotiff.close(); } }