org.geotools.coverageio.jp2k
Class JP2KFormat

java.lang.Object
  extended by org.geotools.coverage.grid.io.AbstractGridFormat
      extended by org.geotools.coverageio.jp2k.JP2KFormat
All Implemented Interfaces:
org.opengis.coverage.grid.Format

public final class JP2KFormat
extends AbstractGridFormat
implements org.opengis.coverage.grid.Format

An implementation of Format for the JP2K format.

Author:
Daniele Romagnoli, GeoSolutions, Simone Giannecchini (simboss), GeoSolutions

Field Summary
static org.opengis.parameter.ParameterDescriptor<java.awt.Color> INPUT_TRANSPARENT_COLOR
          Control the transparency of the input coverages.
static DefaultParameterDescriptor<java.lang.String> SUGGESTED_TILE_SIZE
          This GeneralParameterValue can be provided to the GridCoverageReaders through the GridCoverageReader.read(GeneralParameterValue[]) method in order to specify the suggested size of tiles to avoid long time reading occurring with JAI ImageRead on striped images.
static java.lang.String TILE_SIZE_SEPARATOR
           
static DefaultParameterDescriptor<java.lang.Boolean> USE_MULTITHREADING
          This GeneralParameterValue can be provided to the GridCoverageReaders through the GridCoverageReader.read(GeneralParameterValue[]) method in order to specify to use multithreading when leveraging on a JAI ImageRead operation.
 
Fields inherited from class org.geotools.coverage.grid.io.AbstractGridFormat
GEOTOOLS_WRITE_PARAMS, mInfo, OVERVIEW_POLICY, READ_GRIDGEOMETRY2D, readParameters, USE_JAI_IMAGEREAD, writeParameters
 
Constructor Summary
JP2KFormat()
          Creates an instance and sets the metadata.
 
Method Summary
 boolean accepts(java.lang.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[]);
 AbstractGridCoverage2DReader getReader(java.lang.Object source)
          Gets a GridCoverageReader for this format able to create coverages out of the source object.
 AbstractGridCoverage2DReader getReader(java.lang.Object source, Hints hints)
          Gets a GridCoverageReader for this format able to create coverages out of the source object using the provided hints.
 org.opengis.coverage.grid.GridCoverageWriter getWriter(java.lang.Object destination)
          Retrieves a GridCoverageWriter suitable for writing to the provided destination with this format.
 org.opengis.coverage.grid.GridCoverageWriter getWriter(java.lang.Object destination, Hints hints)
           
protected  void setInfo()
          Sets the metadata information.
 
Methods inherited from class org.geotools.coverage.grid.io.AbstractGridFormat
equals, getDefaultCRS, getDescription, getDocURL, getName, getReadParameters, getVendor, getVersion, getWriteParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.opengis.coverage.grid.Format
getDescription, getDocURL, getName, getReadParameters, getVendor, getVersion, getWriteParameters
 

Field Detail

USE_MULTITHREADING

public static final DefaultParameterDescriptor<java.lang.Boolean> USE_MULTITHREADING
This GeneralParameterValue can be provided to the GridCoverageReaders through the GridCoverageReader.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.


SUGGESTED_TILE_SIZE

public static final DefaultParameterDescriptor<java.lang.String> SUGGESTED_TILE_SIZE
This GeneralParameterValue can be provided to the GridCoverageReaders through the GridCoverageReader.read(GeneralParameterValue[]) method in order to specify the suggested size of tiles to avoid long time reading occurring with JAI ImageRead on striped images. (Images with tiles Nx1) Value should be a String in the form of "W,H" (without quotes) where W is a number representing the suggested tileWidth and H is a number representing the suggested tileHeight.


TILE_SIZE_SEPARATOR

public static final java.lang.String TILE_SIZE_SEPARATOR
See Also:
Constant Field Values

INPUT_TRANSPARENT_COLOR

public static final org.opengis.parameter.ParameterDescriptor<java.awt.Color> INPUT_TRANSPARENT_COLOR
Control the transparency of the input coverages.

Constructor Detail

JP2KFormat

public JP2KFormat()
Creates an instance and sets the metadata.

Method Detail

setInfo

protected void setInfo()
Sets the metadata information.


getReader

public AbstractGridCoverage2DReader getReader(java.lang.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:
org.geotools.data.coverage.grid.AbstractGridFormat#getReader(Object, Hints)

getReader

public AbstractGridCoverage2DReader getReader(java.lang.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:
org.geotools.data.coverage.grid.AbstractGridFormat#getReader(Object)

getWriter

public org.opengis.coverage.grid.GridCoverageWriter getWriter(java.lang.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:
Actually, the plugin does not support write capabilities. The method throws an {@code UnsupportedOperationException}.

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:
Actually, the plugin does not support write capabilities. The method throws an {@code UnsupportedOperationException}.

getWriter

public org.opengis.coverage.grid.GridCoverageWriter getWriter(java.lang.Object destination,
                                                              Hints hints)
See Also:
Actually, the plugin does not support write capabilities. The method throws an {@code UnsupportedOperationException}.

accepts

public boolean accepts(java.lang.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:
org.geotools.data.coverage.grid.AbstractGridFormat#accepts(java.lang.Object input)


Copyright © 1996-2010 Geotools. All Rights Reserved.