Package org.geotools.gce.grassraster
Class GrassBinaryImageReader
- Object
- 
- ImageReader
- 
- GrassBinaryImageReader
 
 
- 
 public class GrassBinaryImageReader extends ImageReader ImageIO reader for the grass binary raster format.The reader extends imageio's ImageReaderto support the reading of GRASS raster data.- Since:
- 3.0
- Author:
- Andrea Antonello (www.hydrologis.com)
- See Also:
- ImageReader,- GrassBinaryRasterReadHandler,- GrassBinaryImageMetadata
 
- 
- 
Field SummaryFields Modifier and Type Field Description ColorModelccmdltheColorModelto be used for the read raster.- 
Fields inherited from class ImageReaderavailableLocales, ignoreMetadata, input, locale, minIndex, originatingProvider, progressListeners, seekForwardOnly, updateListeners, warningListeners, warningLocales
 
- 
 - 
Constructor SummaryConstructors Constructor Description GrassBinaryImageReader(GrassBinaryImageReaderSpi originatingProvider)constructs anImageReaderable to read grass raster maps.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabort()Request to abort any current read operation.protected booleanabortRequested()Checks if a request to abort the current read operation has been made.voiddispose()Cleans thisGrassBinaryImageReaderup.intgetHeight(int imageIndex)IIOMetadatagetImageMetadata(int imageIndex)Iterator<ImageTypeSpecifier>getImageTypes(int imageIndex)intgetNumImages(boolean allowSearch)GrassBinaryRasterReadHandlergetRasterReader()A simple method which returns the properGrassBinaryRasterReadHandlerused to perform reading operationsIIOMetadatagetStreamMetadata()intgetWidth(int imageIndex)BufferedImageread(int imageIndex)BufferedImageread(int imageIndex, ImageReadParam param)BufferedImageread(int imageIndex, ImageReadParam param, boolean useSubSamplingAsRequestedRowcols, boolean castDoubleToFloating, ProgressListener monitor)Performs the read method adding the possibility to override subsampling.RasterreadRaster(int imageIndex, ImageReadParam param)voidreset()Resets thisGrassBinaryImageReader.voidsetCastDoubleToFloating(boolean castDoubleToFloating)voidsetInput(Object input, boolean seekForwardOnly, boolean ignoreMetadata)This method set the input only if the input object is a File.voidsetMonitor(ProgressListener monitor)voidsetUseSubSamplingAsRequestedRowcols(boolean useSubSamplingAsRequestedRowcols)- 
Methods inherited from class ImageReaderaddIIOReadProgressListener, addIIOReadUpdateListener, addIIOReadWarningListener, canReadRaster, checkReadParamBandSettings, clearAbortRequest, computeRegions, getAspectRatio, getAvailableLocales, getDefaultReadParam, getDestination, getFormatName, getImageMetadata, getInput, getLocale, getMinIndex, getNumThumbnails, getOriginatingProvider, getRawImageType, getSourceRegion, getStreamMetadata, getThumbnailHeight, getThumbnailWidth, getTileGridXOffset, getTileGridYOffset, getTileHeight, getTileWidth, hasThumbnails, isIgnoringMetadata, isImageTiled, isRandomAccessEasy, isSeekForwardOnly, processImageComplete, processImageProgress, processImageStarted, processImageUpdate, processPassComplete, processPassStarted, processReadAborted, processSequenceComplete, processSequenceStarted, processThumbnailComplete, processThumbnailPassComplete, processThumbnailPassStarted, processThumbnailProgress, processThumbnailStarted, processThumbnailUpdate, processWarningOccurred, processWarningOccurred, readAll, readAll, readAsRenderedImage, readerSupportsThumbnails, readThumbnail, readTile, readTileRaster, removeAllIIOReadProgressListeners, removeAllIIOReadUpdateListeners, removeAllIIOReadWarningListeners, removeIIOReadProgressListener, removeIIOReadUpdateListener, removeIIOReadWarningListener, setInput, setInput, setLocale
 
- 
 
- 
- 
- 
Field Detail- 
ccmdlpublic ColorModel ccmdl theColorModelto be used for the read raster.
 
- 
 - 
Constructor Detail- 
GrassBinaryImageReaderpublic GrassBinaryImageReader(GrassBinaryImageReaderSpi originatingProvider) constructs anImageReaderable to read grass raster maps.- Parameters:
- originatingProvider- the service provider interface for the reader.
 
 
- 
 - 
Method Detail- 
setInputpublic void setInput(Object input, boolean seekForwardOnly, boolean ignoreMetadata) This method set the input only if the input object is a File.- Overrides:
- setInputin class- ImageReader
 
 - 
setUseSubSamplingAsRequestedRowcolspublic void setUseSubSamplingAsRequestedRowcols(boolean useSubSamplingAsRequestedRowcols) 
 - 
setCastDoubleToFloatingpublic void setCastDoubleToFloating(boolean castDoubleToFloating) 
 - 
getHeightpublic int getHeight(int imageIndex) throws IOException- Specified by:
- getHeightin class- ImageReader
- Throws:
- IOException
 
 - 
getWidthpublic int getWidth(int imageIndex) throws IOException- Specified by:
- getWidthin class- ImageReader
- Throws:
- IOException
 
 - 
getNumImagespublic int getNumImages(boolean allowSearch) throws IOException- Specified by:
- getNumImagesin class- ImageReader
- Throws:
- IOException
 
 - 
getImageTypespublic Iterator<ImageTypeSpecifier> getImageTypes(int imageIndex) throws IOException - Specified by:
- getImageTypesin class- ImageReader
- Throws:
- IOException
 
 - 
getStreamMetadatapublic IIOMetadata getStreamMetadata() throws IOException - Specified by:
- getStreamMetadatain class- ImageReader
- Throws:
- IOException
 
 - 
getImageMetadatapublic IIOMetadata getImageMetadata(int imageIndex) throws IOException - Specified by:
- getImageMetadatain class- ImageReader
- Throws:
- IOException
 
 - 
setMonitorpublic void setMonitor(ProgressListener monitor) 
 - 
readpublic BufferedImage read(int imageIndex, ImageReadParam param, boolean useSubSamplingAsRequestedRowcols, boolean castDoubleToFloating, ProgressListener monitor) throws IOException Performs the read method adding the possibility to override subsampling.- Parameters:
- imageIndex- same as- read(int, ImageReadParam)
- param- same as- read(int, ImageReadParam)
- useSubSamplingAsRequestedRowcols- a flag that gives the possibility to bypass the imageio subsampling mechanism. With GRASS maps this is often more performant in some boundary situations. In the case this flag is set to true, the subsampling values will be handled as the requested columns and rows.
- castDoubleToFloating- a flag that gives the possibility to force the reading of a map as a floating point map. This is necessary right now because of a imageio bug: https://jai-imageio-core.dev.java.net/issues/show_bug.cgi?id=180
- Returns:
- same as read(int, ImageReadParam)
- Throws:
- IOException- same as- read(int, ImageReadParam)
 
 - 
readpublic BufferedImage read(int imageIndex, ImageReadParam param) throws IOException - Specified by:
- readin class- ImageReader
- Throws:
- IOException
 
 - 
readpublic BufferedImage read(int imageIndex) throws IOException - Overrides:
- readin class- ImageReader
- Throws:
- IOException
 
 - 
readRasterpublic Raster readRaster(int imageIndex, ImageReadParam param) throws IOException - Overrides:
- readRasterin class- ImageReader
- Throws:
- IOException
 
 - 
getRasterReaderpublic GrassBinaryRasterReadHandler getRasterReader() A simple method which returns the properGrassBinaryRasterReadHandlerused to perform reading operations- Returns:
- Returns the rasterReader.
 
 - 
disposepublic void dispose() Cleans thisGrassBinaryImageReaderup.- Overrides:
- disposein class- ImageReader
 
 - 
resetpublic void reset() Resets thisGrassBinaryImageReader.- Overrides:
- resetin class- ImageReader
 
 - 
abortpublic void abort() Request to abort any current read operation.- Overrides:
- abortin class- ImageReader
 
 - 
abortRequestedprotected boolean abortRequested() Checks if a request to abort the current read operation has been made.- Overrides:
- abortRequestedin class- ImageReader
 
 
- 
 
-