Package org.geotools.coverageio.gdal
Class BaseGDALGridFormat
- Object
-
- AbstractGridFormat
-
- BaseGDALGridFormat
-
- All Implemented Interfaces:
Format
- Direct Known Subclasses:
AIGFormat
,DTEDFormat
,ECWFormat
,EnviHdrFormat
,ErdasImgFormat
,EsriHdrFormat
,IDRISIFormat
,JP2ECWFormat
,JP2KFormat
,JP2MrSIDFormat
,MrSIDFormat
,NITFFormat
,RPFTOCFormat
,SRPFormat
,VRTFormat
,VSIFormat
public abstract class BaseGDALGridFormat extends AbstractGridFormat implements Format
A Base abstract class implementingFormat
, to be extended by Formats leveraging on GDAL.- Author:
- Daniele Romagnoli, GeoSolutions, Simone Giannecchini, GeoSolutions
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
BaseGDALGridFormat.InfoWrapper
-
Field Summary
Fields Modifier and Type Field Description protected static GeneralParameterDescriptor[]
PARAM_DESCRIPTOR
Base Parameter Descriptorstatic DefaultParameterDescriptor<Boolean>
USE_MULTITHREADING
ThisGeneralParameterValue
can be provided to theGridCoverageReader
s through theGridCoverageReader.read(GeneralParameterValue[])
method in order to specify to use multithreading when leveraging on a JAI ImageRead operation.-
Fields inherited from class AbstractGridFormat
BACKGROUND_COLOR, BANDS, DECIMATION_POLICY, ELEVATION, FOOTPRINT_BEHAVIOR, GEOTOOLS_WRITE_PARAMS, INPUT_TRANSPARENT_COLOR, INTERPOLATION, mInfo, OVERVIEW_POLICY, PROGRESS_LISTENER, READ_GRIDGEOMETRY2D, readParameters, RESCALE_PIXELS, SUGGESTED_TILE_SIZE, TILE_SIZE_SEPARATOR, TIME, USE_JAI_IMAGEREAD, writeParameters
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
BaseGDALGridFormat(ImageReaderSpi spi)
Constructor for theBaseGDALGridFormat
.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
accepts(Object input, Hints hints)
Tells me if thisFormat
can read the providedinput
.GeoToolsWriteParams
getDefaultImageIOWriteParameters()
Returns an instance ofImageWriteParam
that can be used to control a subsequentGridCoverageWriter.write(org.geotools.api.coverage.grid.GridCoverage, org.geotools.api.parameter.GeneralParameterValue[])
;protected static ParameterGroup
getDefaultParameterGroup(Map<String,String> mInfo)
Return a ParameterGroup with default General Parameter Descriptors.AbstractGridCoverage2DReader
getReader(Object source)
Gets aGridCoverageReader
for this format able to create coverages out of thesource
object.GridCoverageWriter
getWriter(Object destination)
Retrieves aGridCoverageWriter
suitable for writing to the provideddestination
with this format.GridCoverageWriter
getWriter(Object destination, Hints hints)
Call the accepts() method before asking for a writer to determine if the current object is supported.protected abstract void
setInfo()
Each plugin needs to implement this method defining format specific propertiesprotected void
setInfo(BaseGDALGridFormat.InfoWrapper infoWrapper)
-
Methods inherited from class AbstractGridFormat
accepts, equals, getDefaultCRS, getDescription, getDocURL, getName, getReader, getReadParameters, getVendor, getVersion, getWriteParameters
-
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface Format
getDescription, getDocURL, getName, getReadParameters, getVendor, getVersion, getWriteParameters
-
-
-
-
Field Detail
-
USE_MULTITHREADING
public static final DefaultParameterDescriptor<Boolean> USE_MULTITHREADING
ThisGeneralParameterValue
can be provided to theGridCoverageReader
s through theGridCoverageReader.read(GeneralParameterValue[])
method in order to specify to use multithreading when leveraging on a JAI ImageRead operation. This will be achieved with the use of the ImageReadMT operation of the ImageIO-Ext.
-
PARAM_DESCRIPTOR
protected static final GeneralParameterDescriptor[] PARAM_DESCRIPTOR
Base Parameter Descriptor
-
-
Constructor Detail
-
BaseGDALGridFormat
protected BaseGDALGridFormat(ImageReaderSpi spi)
Constructor for theBaseGDALGridFormat
. It is invoked by the underlying implementations.- Parameters:
spi
- the format specificImageReaderSpi
instance
-
-
Method Detail
-
setInfo
protected abstract void setInfo()
Each plugin needs to implement this method defining format specific properties
-
getWriter
public GridCoverageWriter getWriter(Object destination)
Description copied from class:AbstractGridFormat
Retrieves aGridCoverageWriter
suitable for writing to the provideddestination
with this format.In case no writers are available
null
is returned.- Specified by:
getWriter
in classAbstractGridFormat
- Parameters:
destination
- The destinatin where to write.- Returns:
- A
GridCoverageWriter
suitable for writing to the provideddestination
with this format. - See Also:
Actually, the plugin does not support write capabilities. The method throws an .
-
getDefaultImageIOWriteParameters
public GeoToolsWriteParams getDefaultImageIOWriteParameters()
Description copied from class:AbstractGridFormat
Returns an instance ofImageWriteParam
that can be used to control a subsequentGridCoverageWriter.write(org.geotools.api.coverage.grid.GridCoverage, org.geotools.api.parameter.GeneralParameterValue[])
;Be careful with using the
ImageWriteParam
since their usage is still experimental.- Specified by:
getDefaultImageIOWriteParameters
in classAbstractGridFormat
- Returns:
- an instance of
ImageWriteParam
. - See Also:
Actually, the plugin does not support write capabilities. The method throws an .
-
getWriter
public GridCoverageWriter getWriter(Object destination, Hints hints)
Description copied from class:AbstractGridFormat
Call the accepts() method before asking for a writer to determine if the current object is supported.- Specified by:
getWriter
in classAbstractGridFormat
- Parameters:
destination
- the destination object to write a WorldImage tohints
-Hints
to control the internal machinery.- Returns:
- a new WorldImageWriter for the destination
- See Also:
Actually, the plugin does not support write capabilities. The method throws an .
-
accepts
public boolean accepts(Object input, Hints hints)
Description copied from class:AbstractGridFormat
Tells me if thisFormat
can read the providedinput
.- Specified by:
accepts
in classAbstractGridFormat
- Parameters:
input
- The input object to test for suitability.hints
-Hints
to control the accepts internal machinery.- Returns:
- True if this format can read this object, False otherwise.
- See Also:
org.geotools.data.coverage.grid.AbstractGridFormat#accepts(java.lang.Object input)
-
getDefaultParameterGroup
protected static ParameterGroup getDefaultParameterGroup(Map<String,String> mInfo)
Return a ParameterGroup with default General Parameter Descriptors.- Parameters:
mInfo
- Set of properties info- Returns:
- a
ParameterGroup
with DefaultGeneralParameterDescriptors
.
-
getReader
public AbstractGridCoverage2DReader getReader(Object source)
Description copied from class:AbstractGridFormat
Gets aGridCoverageReader
for this format able to create coverages out of thesource
object.In case this
Format
cannot reader the providedsource
objectnull
is returned.- Specified by:
getReader
in classAbstractGridFormat
- Parameters:
source
- The source object to parse.- Returns:
- A reader for this
Format
or null. - See Also:
org.geotools.data.coverage.grid.AbstractGridFormat#getReader(Object source)
-
setInfo
protected void setInfo(BaseGDALGridFormat.InfoWrapper infoWrapper)
-
-