Revision 823 trunk/libraries/libjni-gdal/src-test/example.java
example.java | ||
---|---|---|
117 | 117 |
//Fetching a Raster Band ---------------------------- |
118 | 118 |
//Several binding are missing yet |
119 | 119 |
|
120 |
int tipo; |
|
120 | 121 |
try{ |
121 | 122 |
mirasterband=migdal.getRasterBand(iBand+1); |
122 | 123 |
System.out.println("SIZE BANDA=("+mirasterband.getRasterBandXSize()+","+mirasterband.getRasterBandYSize()+")"); |
123 | 124 |
System.out.println("SIZE BLOQUE BANDA=("+mirasterband.getBlockXSize()+","+mirasterband.getBlockYSize()+")"); |
124 | 125 |
noverviews=mirasterband.getOverviewCount(); |
125 | 126 |
System.out.println("N? OVERVIEWS="+noverviews); |
126 |
|
|
127 |
tipo = mirasterband.getRasterDataType(); |
|
128 |
System.out.println("TIPO DE DATOS BANDA="+tipo); |
|
127 | 129 |
}catch(GdalException e){ |
128 | 130 |
e.printStackTrace(); |
129 | 131 |
System.exit(1); |
... | ... | |
175 | 177 |
//Reading Raster Data ---------------------------- |
176 | 178 |
|
177 | 179 |
try{ |
178 |
buf = mioverview.readRaster(0, i, xoverview, 1, xoverview, 1, Gdal.GDT_Byte);
|
|
180 |
buf = mioverview.readRaster(0, i, xoverview, 1, xoverview, 1, tipo);
|
|
179 | 181 |
}catch(GdalException e){ |
180 | 182 |
System.out.println("Error in BSBReadLine"); |
181 | 183 |
System.exit(1); |
Also available in: Unified diff