|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TiledRasterReader
An Iterator like interface to read ArcSDE rasters for a given ArcSDE raster dataset (whether it is a single raster or a raster catalog).
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 nextRaster()
to get the id of the raster immediately available to be
read through #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.
Method Summary | |
---|---|
java.awt.image.RenderedImage |
read(long rasterId,
int pyramidLevel,
java.awt.Rectangle tileRange)
Reads the image subset determined by the given pyramid level and tile range for the currently available raster attribute in the requested raster column for the given raster dataset. |
Method Detail |
---|
java.awt.image.RenderedImage read(long rasterId, int pyramidLevel, java.awt.Rectangle tileRange) throws java.io.IOException
pyramidLevel
- the pyramid level to readtileRange
- the range of tiles to read at the given pyramid level. The boundaries of the tile
range are inclusive and starts at 0,0
for the upper left most tile.
java.io.IOException
- for any exception occurred while reading the image
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |