Revision 6504
org.gvsig.raster/branches/org.gvsig.raster.2.4/org.gvsig.raster/org.gvsig.raster.tilecache/org.gvsig.raster.tilecache.provider/src/main/java/org/gvsig/raster/tilecache/provider/TileStructImage.java | ||
---|---|---|
390 | 390 |
|
391 | 391 |
params.setDynValue("compress", "NONE"); |
392 | 392 |
params.setDynValue("tfw", false); |
393 |
|
|
394 |
//FIXME: Ver de coger estos dos valores del inner provider para que los tiles sean homog?neos con el raster original |
|
393 | 395 |
params.setDynValue("photometric", "RGB"); |
394 | 396 |
params.setDynValue("alpha", "NON-PREMULTIPLIED"); |
395 | 397 |
|
... | ... | |
411 | 413 |
} |
412 | 414 |
|
413 | 415 |
/** |
414 |
* @return delegatedRasterStore |
|
415 |
* @throws CloneNotSupportedException |
|
416 |
* @throws ValidateDataParametersException |
|
417 |
* @throws DataException |
|
418 |
* @throws BufferException |
|
419 |
* @throws CreateEnvelopeException |
|
420 |
*/ |
|
421 |
private RasterStore getDelegatedRasterStore() throws ValidateDataParametersException, CreateEnvelopeException, |
|
422 |
BufferException, DataException, CloneNotSupportedException { |
|
423 |
return createTileStore(0, 0, 0); |
|
424 |
} |
|
425 |
|
|
426 |
/** |
|
427 | 416 |
* @return the band number |
428 | 417 |
* @throws CloneNotSupportedException |
429 | 418 |
* @throws ValidateDataParametersException |
... | ... | |
468 | 457 |
*/ |
469 | 458 |
private void fillStoreInfo() throws ValidateDataParametersException, CreateEnvelopeException, BufferException, |
470 | 459 |
DataException, CloneNotSupportedException { |
471 |
RasterStore rasterStore = null; |
|
460 |
this.bandNumber = this.innerProvider.getBands(); |
|
461 |
this.dataTypes = new int[this.bandNumber]; |
|
462 |
for (int i = 0; i < this.bandNumber; i++) { |
|
463 |
dataTypes[i] = this.innerProvider.getBandInfo(i).getDataType(); |
|
464 |
} |
|
472 | 465 |
try { |
473 |
rasterStore = getDelegatedRasterStore(); |
|
474 |
this.bandNumber = rasterStore.getBands(); |
|
475 |
this.dataTypes = new int[this.bandNumber]; |
|
476 |
for (int i = 0; i < this.bandNumber; i++) { |
|
477 |
dataTypes[i] = rasterStore.getBandInfo(i).getDataType(); |
|
478 |
} |
|
479 |
try { |
|
480 |
this.colorInterpretation = |
|
481 |
rasterStore.invokeDynMethod(RasterStore.DYNMETHOD_GETCOLORINTERPRETATION_NAME, null); |
|
482 |
this.colorTable = rasterStore.invokeDynMethod(RasterStore.DYNMETHOD_GETCOLORTABLE_NAME, null); |
|
483 |
this.legend = rasterStore.invokeDynMethod(RasterStore.DYNMETHOD_GETLEGEND_NAME, null); |
|
484 |
} catch (DynMethodException e) { |
|
485 |
logger.warn("Can't fill legend info from store."); |
|
486 |
} |
|
487 |
|
|
488 |
} finally { |
|
489 |
if (rasterStore != null) { |
|
490 |
DisposeUtils.dispose(rasterStore); |
|
491 |
} |
|
466 |
this.colorInterpretation = |
|
467 |
this.innerProvider.invokeDynMethod(RasterStore.DYNMETHOD_GETCOLORINTERPRETATION_NAME, null); |
|
468 |
this.colorTable = this.innerProvider.invokeDynMethod(RasterStore.DYNMETHOD_GETCOLORTABLE_NAME, null); |
|
469 |
this.legend = this.innerProvider.invokeDynMethod(RasterStore.DYNMETHOD_GETLEGEND_NAME, null); |
|
470 |
} catch (DynMethodException e) { |
|
471 |
logger.warn("Can't fill legend info from store."); |
|
492 | 472 |
} |
493 | 473 |
} |
494 | 474 |
|
Also available in: Unified diff