public class NetCDFImageReader extends GeoSpatialImageReader implements FileSetManager
Each ImageIndex corresponds to a 2D-slice of NetCDF.
NetCDFImageReader is a ImageReader able to create RenderedImage from
NetCDF-CF sources.
file, numImagesavailableLocales, ignoreMetadata, input, locale, minIndex, originatingProvider, progressListeners, seekForwardOnly, updateListeners, warningListeners, warningLocales| Constructor and Description |
|---|
NetCDFImageReader(ImageReaderSpi originatingProvider) |
| Modifier and Type | Method and Description |
|---|---|
void |
addFile(String filePath)
Add a file to the file set manager
|
void |
dispose() |
protected void |
finalize() |
protected static void |
flipVertically(ImageReadParam param,
int srcHeight,
Rectangle srcRegion) |
protected VariableAdapter |
getCoverageDescriptor(int imageIndex)
Return the
VariableWrapper related to that imageIndex |
VariableAdapter |
getCoverageDescriptor(Name name) |
List<Name> |
getCoveragesNames()
Return the name of coverages made available by this provider
|
int |
getCoveragesNumber()
The number of coverages made available by this provider.
|
int |
getHeight(int imageIndex) |
IIOMetadata |
getImageMetadata(int imageIndex) |
RasterLayerRequest |
getImageMosaicRequest() |
Iterator<ImageTypeSpecifier> |
getImageTypes(int imageIndex) |
SimpleFeatureType |
getIndexSchema(Name coverageName,
CoordinateSystem cs) |
SimpleFeatureType |
getIndexSchema(Name coverageName,
CoordinateSystem coordinateSystem,
boolean isShared) |
Slice2DIndex |
getSlice2DIndex(int imageIndex)
Return the
Slice2DIndex associated to the specified imageIndex |
Variable |
getVariableByName(String varName)
Get a
Variable by name. |
int |
getWidth(int imageIndex) |
protected int |
initIndex()
Index Initialization. store indexing information.
|
List<String> |
list()
Return the list of all the files currently added to the manager
|
protected IIOException |
netcdfFailure(Exception e)
Wraps a generic exception into a
IIOException. |
void |
purge()
Remove all the files from the manager (An implementation may also physically remove all the
files)
|
BufferedImage |
read(int imageIndex,
ImageReadParam param) |
void |
removeFile(String filePath)
Remove a file from the manager (An implementation may also physically remove the file)
|
void |
reset()
Reset the status of this reader
|
void |
setInput(Object input,
boolean seekForwardOnly,
boolean ignoreMetadata) |
protected void |
setNumImages(int numImages) |
void |
setRasterLayerRequest(RasterLayerRequest request) |
checkImageIndex, getAuxiliaryDatastorePath, getAuxiliaryFilesPath, getCatalog, getImageIndex, getNumImages, getStreamMetadata, initCatalog, initCatalog, setAuxiliaryDatastorePath, setAuxiliaryFilesPath, setCatalog, setRepositoryabort, abortRequested, addIIOReadProgressListener, 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, read, readAll, readAll, readAsRenderedImage, readerSupportsThumbnails, readRaster, readThumbnail, readTile, readTileRaster, removeAllIIOReadProgressListeners, removeAllIIOReadUpdateListeners, removeAllIIOReadWarningListeners, removeIIOReadProgressListener, removeIIOReadUpdateListener, removeIIOReadWarningListener, setInput, setInput, setLocalepublic NetCDFImageReader(ImageReaderSpi originatingProvider)
public void setRasterLayerRequest(RasterLayerRequest request)
public RasterLayerRequest getImageMosaicRequest()
public List<Name> getCoveragesNames()
GeoSpatialImageReadergetCoveragesNames in class GeoSpatialImageReaderpublic int getCoveragesNumber()
GeoSpatialImageReadergetCoveragesNumber in class GeoSpatialImageReaderprotected void setNumImages(int numImages)
public int getHeight(int imageIndex)
throws IOException
getHeight in class ImageReaderIOExceptionpublic Iterator<ImageTypeSpecifier> getImageTypes(int imageIndex) throws IOException
getImageTypes in class ImageReaderIOExceptionpublic int getWidth(int imageIndex)
throws IOException
getWidth in class ImageReaderIOExceptionpublic Variable getVariableByName(String varName)
Variable by name.varName - the name of the Variable to pick.null.public void reset()
reset in class ImageReaderpublic void setInput(Object input, boolean seekForwardOnly, boolean ignoreMetadata)
setInput in class ImageReaderprotected int initIndex()
throws InvalidRangeException,
IOException
InvalidRangeExceptionIOExceptionpublic void dispose()
dispose in class GeoSpatialImageReaderprotected void finalize()
throws Throwable
finalize in class GeoSpatialImageReaderThrowableprotected IIOException netcdfFailure(Exception e) throws IOException
IIOException.IOExceptionpublic Slice2DIndex getSlice2DIndex(int imageIndex) throws IOException
Slice2DIndex associated to the specified imageIndeximageIndex - IOExceptionprotected VariableAdapter getCoverageDescriptor(int imageIndex)
VariableWrapper related to that imageIndeximageIndex - public VariableAdapter getCoverageDescriptor(Name name)
getCoverageDescriptor in class GeoSpatialImageReaderpublic BufferedImage read(int imageIndex, ImageReadParam param) throws IOException
read in class ImageReaderIOExceptionImageReader.read(int, javax.imageio.ImageReadParam)protected static void flipVertically(ImageReadParam param, int srcHeight, Rectangle srcRegion)
public SimpleFeatureType getIndexSchema(Name coverageName, CoordinateSystem cs) throws Exception
Exceptionpublic SimpleFeatureType getIndexSchema(Name coverageName, CoordinateSystem coordinateSystem, boolean isShared) throws Exception
Exceptionpublic void addFile(String filePath)
FileSetManageraddFile in interface FileSetManagerpublic List<String> list()
FileSetManagerlist in interface FileSetManagerpublic void removeFile(String filePath)
FileSetManagerremoveFile in interface FileSetManagerpublic void purge()
FileSetManagerpurge in interface FileSetManagerpublic IIOMetadata getImageMetadata(int imageIndex) throws IOException
getImageMetadata in class GeoSpatialImageReaderIOExceptionCopyright © 1996–2019 Geotools. All rights reserved.