Package org.geotools.coverage.grid.io
Class UnknownFormat
- Object
-
- AbstractGridFormat
-
- UnknownFormat
-
- All Implemented Interfaces:
Format
public class UnknownFormat extends AbstractGridFormat implements Format
This class can be used when a properFormat
cannot be found for some input sources.It implements the abstract method of
AbstractGridFormat
but it always returns null to indicate that the format it represents is unknown.- Author:
- Jesse Eichar, Simone Giannecchini (simboss)
-
-
Field Summary
-
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 Constructor Description UnknownFormat()
Creates a new UnknownFormat object.
-
Method Summary
All Methods Instance 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[])
;AbstractGridCoverage2DReader
getReader(Object source)
Gets aGridCoverageReader
for this format able to create coverages out of thesource
object.AbstractGridCoverage2DReader
getReader(Object source, Hints hints)
Gets aGridCoverageReader
for this format able to create coverages out of thesource
object using the providedhints
.ParameterValueGroup
getReadParameters()
Retrieve the parameter information for aread
operation.ParameterValueGroup
getWriteParameters()
Retrieve the parameter information for awrite
operation.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.-
Methods inherited from class AbstractGridFormat
accepts, equals, getDefaultCRS, getDescription, getDocURL, getName, getVendor, getVersion
-
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface Format
getDescription, getDocURL, getName, getVendor, getVersion
-
-
-
-
Method Detail
-
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:
AbstractGridFormat.getReader(Object)
-
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:
AbstractGridFormat.getWriter(Object)
-
getReader
public AbstractGridCoverage2DReader getReader(Object source, Hints hints)
Description copied from class:AbstractGridFormat
Gets aGridCoverageReader
for this format able to create coverages out of thesource
object using the providedhints
.In case this
Format
cannot reader the providedsource
objectnull
is returned.- Specified by:
getReader
in classAbstractGridFormat
- Parameters:
source
- The source object to parse. *hints
- TheHints
to use when trying to instantiate this reader.- Returns:
- A reader for this
Format
or null. - See Also:
AbstractGridFormat.getReader(Object, Hints)
-
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:
AbstractGridFormat.getDefaultImageIOWriteParameters()
-
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:
AbstractGridFormat.accepts(Object)
-
getReadParameters
public ParameterValueGroup getReadParameters()
Description copied from interface:Format
Retrieve the parameter information for aread
operation.- Specified by:
getReadParameters
in interfaceFormat
- Overrides:
getReadParameters
in classAbstractGridFormat
-
getWriteParameters
public ParameterValueGroup getWriteParameters()
Description copied from interface:Format
Retrieve the parameter information for awrite
operation.- Specified by:
getWriteParameters
in interfaceFormat
- Overrides:
getWriteParameters
in classAbstractGridFormat
-
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
-
-