Sample usage:
RasterReaderFactory readerFactory = .... RasterDatasetInfo raserInfo = ... ArcSDERasterReader reader = readerFactory.create(rasterInfo); try{ Long nextRasterId; while((nextRasterId = reader.nextRaster()) != null){ if(amIInterestedInThisRaster(nextRasterId)){ int pyramidLevel = ... Rectangle tileRange = ... RenderedImage raster = reader.read(pyramidLevel, tileRange); } } }finally{ reader.dispose(); }
So one has to call {@code nextRaster()} to get the id of the raster immediately available to beread through {@link #read()}. This is so because there might be more than one raster on a raster dataset and the order they are fetched from the ArcSDE server is non deterministic, and once you opened a stream to a raster you can't open another one and then read the former.
@author Gabriel Roldan @source $URL$ @version $Id$ @since 2.5.7
|
|