Revision 18040 trunk/libraries/libRaster/src/org/gvsig/raster/dataset/io/GdalNative.java
GdalNative.java | ||
---|---|---|
284 | 284 |
|
285 | 285 |
public void setView(double dWorldTLX, double dWorldTLY, |
286 | 286 |
double dWorldBRX, double dWorldBRY, |
287 |
int nWidth, int nHeight) { |
|
287 |
int nWidth, int nHeight) throws GdalException {
|
|
288 | 288 |
currentFullWidth = width; |
289 | 289 |
currentFullHeight = height; |
290 | 290 |
Point2D tl = worldToRaster(new Point2D.Double(dWorldTLX, dWorldTLY)); |
... | ... | |
304 | 304 |
lastReadLine = Math.min(tl.getY(), br.getY()); |
305 | 305 |
|
306 | 306 |
//Para lectura del renderizado (ARGB). readWindow selecciona las bandas que necesita. |
307 |
try { |
|
308 |
// calcula el overview a usar |
|
309 |
gdalBands = new GdalRasterBand[4]; |
|
310 |
calcOverview(tl, br); |
|
311 |
|
|
312 |
// Selecciona las bandas y los overviews necesarios |
|
313 |
gdalBands[0] = getRasterBand(rBandNr); |
|
314 |
gdalBands[1] = gdalBands[0]; |
|
307 |
|
|
308 |
// calcula el overview a usar |
|
309 |
gdalBands = new GdalRasterBand[4]; |
|
310 |
calcOverview(tl, br); |
|
311 |
|
|
312 |
// Selecciona las bandas y los overviews necesarios |
|
313 |
/*gdalBands[0] = getRasterBand(rBandNr); |
|
314 |
gdalBands[1] = gdalBands[0]; |
|
315 |
gdalBands[2] = gdalBands[1]; |
|
316 |
|
|
317 |
if(getRasterCount() >= 2) { |
|
318 |
gdalBands[1] = getRasterBand(gBandNr); |
|
315 | 319 |
gdalBands[2] = gdalBands[1]; |
316 |
|
|
320 |
} |
|
321 |
if(this.getRasterCount() >= 3) |
|
322 |
gdalBands[2] = getRasterBand(bBandNr); |
|
323 |
if(colorInterpr.isAlphaBand()) |
|
324 |
gdalBands[3] = getRasterBand(aBandNr); |
|
325 |
|
|
326 |
assignDataTypeFromGdalRasterBands(gdalBands); |
|
327 |
|
|
328 |
if (currentOverview > 0) { |
|
329 |
gdalBands[0] = gdalBands[0].getOverview(currentOverview); |
|
317 | 330 |
if(getRasterCount() >= 2) { |
318 |
gdalBands[1] = getRasterBand(gBandNr); |
|
319 |
gdalBands[2] = gdalBands[1]; |
|
331 |
gdalBands[1] = gdalBands[1].getOverview(currentOverview); |
|
320 | 332 |
} |
321 | 333 |
if(this.getRasterCount() >= 3) |
322 |
gdalBands[2] = getRasterBand(bBandNr);
|
|
334 |
gdalBands[2] = gdalBands[2].getOverview(currentOverview);
|
|
323 | 335 |
if(colorInterpr.isAlphaBand()) |
324 |
gdalBands[3] = getRasterBand(aBandNr); |
|
325 |
|
|
326 |
assignDataTypeFromGdalRasterBands(gdalBands); |
|
327 |
|
|
328 |
if (currentOverview > 0) { |
|
329 |
gdalBands[0] = gdalBands[0].getOverview(currentOverview); |
|
330 |
if(getRasterCount() >= 2) { |
|
331 |
gdalBands[1] = gdalBands[1].getOverview(currentOverview); |
|
332 |
} |
|
333 |
if(this.getRasterCount() >= 3) |
|
334 |
gdalBands[2] = gdalBands[2].getOverview(currentOverview); |
|
335 |
if(colorInterpr.isAlphaBand()) |
|
336 |
gdalBands[3] = gdalBands[3].getOverview(currentOverview); |
|
337 |
|
|
338 |
} |
|
339 |
|
|
340 |
} catch (GdalException e) { |
|
341 |
e.printStackTrace(); |
|
342 |
} |
|
336 |
gdalBands[3] = gdalBands[3].getOverview(currentOverview); |
|
337 |
|
|
338 |
}*/ |
|
343 | 339 |
} |
344 | 340 |
|
345 | 341 |
/** |
Also available in: Unified diff