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, numImages
availableLocales, 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, setRepository
abort, 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, setLocale
public NetCDFImageReader(ImageReaderSpi originatingProvider)
public void setRasterLayerRequest(RasterLayerRequest request)
public RasterLayerRequest getImageMosaicRequest()
public List<Name> getCoveragesNames()
GeoSpatialImageReader
getCoveragesNames
in class GeoSpatialImageReader
public int getCoveragesNumber()
GeoSpatialImageReader
getCoveragesNumber
in class GeoSpatialImageReader
protected void setNumImages(int numImages)
public int getHeight(int imageIndex) throws IOException
getHeight
in class ImageReader
IOException
public Iterator<ImageTypeSpecifier> getImageTypes(int imageIndex) throws IOException
getImageTypes
in class ImageReader
IOException
public int getWidth(int imageIndex) throws IOException
getWidth
in class ImageReader
IOException
public Variable getVariableByName(String varName)
Variable
by name.varName
- the name of the Variable
to pick.null
.public void reset()
reset
in class ImageReader
public void setInput(Object input, boolean seekForwardOnly, boolean ignoreMetadata)
setInput
in class ImageReader
protected int initIndex() throws InvalidRangeException, IOException
InvalidRangeException
IOException
public void dispose()
dispose
in class GeoSpatialImageReader
protected void finalize() throws Throwable
finalize
in class GeoSpatialImageReader
Throwable
protected IIOException netcdfFailure(Exception e) throws IOException
IIOException
.IOException
public Slice2DIndex getSlice2DIndex(int imageIndex) throws IOException
Slice2DIndex
associated to the specified imageIndeximageIndex
- IOException
protected VariableAdapter getCoverageDescriptor(int imageIndex)
VariableWrapper
related to that imageIndeximageIndex
- public VariableAdapter getCoverageDescriptor(Name name)
getCoverageDescriptor
in class GeoSpatialImageReader
public BufferedImage read(int imageIndex, ImageReadParam param) throws IOException
read
in class ImageReader
IOException
ImageReader.read(int, javax.imageio.ImageReadParam)
protected static void flipVertically(ImageReadParam param, int srcHeight, Rectangle srcRegion)
public SimpleFeatureType getIndexSchema(Name coverageName, CoordinateSystem cs) throws Exception
Exception
public SimpleFeatureType getIndexSchema(Name coverageName, CoordinateSystem coordinateSystem, boolean isShared) throws Exception
Exception
public void addFile(String filePath)
FileSetManager
addFile
in interface FileSetManager
public List<String> list()
FileSetManager
list
in interface FileSetManager
public void removeFile(String filePath)
FileSetManager
removeFile
in interface FileSetManager
public void purge()
FileSetManager
purge
in interface FileSetManager
public IIOMetadata getImageMetadata(int imageIndex) throws IOException
getImageMetadata
in class GeoSpatialImageReader
IOException
Copyright © 1996–2019 Geotools. All rights reserved.