org.geotools.coverage.grid.io
Class UnknownFormat

Object
  extended by AbstractGridFormat
      extended by UnknownFormat
All Implemented Interfaces:
Format

public class UnknownFormat
extends AbstractGridFormat
implements Format

This class can be used when a proper Format 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)
Module:

Field Summary
 
Fields inherited from class AbstractGridFormat
GEOTOOLS_WRITE_PARAMS, mInfo, OVERVIEW_POLICY, READ_GRIDGEOMETRY2D, readParameters, USE_JAI_IMAGEREAD, writeParameters
 
Constructor Summary
UnknownFormat()
          Creates a new UnknownFormat object.
 
Method Summary
 boolean accepts(Object input)
          Tells me if this Format can read the provided input.
 GeoToolsWriteParams getDefaultImageIOWriteParameters()
          Returns an instance of ImageWriteParam that can be used to control a subsequent GridCoverageWriter.write(org.opengis.coverage.grid.GridCoverage, org.opengis.parameter.GeneralParameterValue[]); Be careful with using the ImageWriteParam since their usage is still experimental.
 GridCoverageReader getReader(Object source)
          Gets a GridCoverageReader for this format able to create coverages out of the source object.
 GridCoverageReader getReader(Object source, Hints hints)
          Gets a GridCoverageReader for this format able to create coverages out of the source object using the provided hints.
 ParameterValueGroup getReadParameters()
           
 ParameterValueGroup getWriteParameters()
           
 GridCoverageWriter getWriter(Object destination)
          Retrieves a GridCoverageWriter suitable for writing to the provided destination with this format.
 
Methods inherited from class AbstractGridFormat
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
 

Constructor Detail

UnknownFormat

public UnknownFormat()
Creates a new UnknownFormat object.

Method Detail

getReader

public GridCoverageReader getReader(Object source)
Description copied from class: AbstractGridFormat
Gets a GridCoverageReader for this format able to create coverages out of the source object.

In case this Format cannot reader the provided source object null is returned.

Specified by:
getReader in class AbstractGridFormat
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 a GridCoverageWriter suitable for writing to the provided destination with this format.

In case no writers are availaible null is returned.

Specified by:
getWriter in class AbstractGridFormat
Parameters:
destination - The destinatin where to write.
Returns:
A GridCoverageWriter suitable for writing to the provided destination with this format.
See Also:
AbstractGridFormat.getWriter(Object)

getReader

public GridCoverageReader getReader(Object source,
                                    Hints hints)
Description copied from class: AbstractGridFormat
Gets a GridCoverageReader for this format able to create coverages out of the source object using the provided hints.

In case this Format cannot reader the provided source object null is returned.

Specified by:
getReader in class AbstractGridFormat
Parameters:
source - The source object to parse. *
hints - The Hints 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 of ImageWriteParam that can be used to control a subsequent GridCoverageWriter.write(org.opengis.coverage.grid.GridCoverage, org.opengis.parameter.GeneralParameterValue[]);

Be careful with using the ImageWriteParam since their usage is still experimental.

Specified by:
getDefaultImageIOWriteParameters in class AbstractGridFormat
Returns:
an instance of ImageWriteParam.
See Also:
AbstractGridFormat.getDefaultImageIOWriteParameters()

accepts

public boolean accepts(Object input)
Description copied from class: AbstractGridFormat
Tells me if this Format can read the provided input.

Specified by:
accepts in class AbstractGridFormat
Parameters:
input - The input object to test for suitablilty.
Returns:
True if this format can read this object, False otherwise.
See Also:
AbstractGridFormat.accepts(Object)

getReadParameters

public ParameterValueGroup getReadParameters()
Specified by:
getReadParameters in interface Format
Overrides:
getReadParameters in class AbstractGridFormat

getWriteParameters

public ParameterValueGroup getWriteParameters()
Specified by:
getWriteParameters in interface Format
Overrides:
getWriteParameters in class AbstractGridFormat


Copyright © 1996-2009 Geotools. All Rights Reserved.