Package org.geotools.coverageio.jp2k
Class JP2KFormat
- Object
-
- AbstractGridFormat
-
- JP2KFormat
-
- All Implemented Interfaces:
Format
public final class JP2KFormat extends AbstractGridFormat implements Format
An implementation ofFormatfor the JP2K format.- Author:
- Daniele Romagnoli, GeoSolutions, Simone Giannecchini (simboss), GeoSolutions
-
-
Field Summary
Fields Modifier and Type Field Description static DefaultParameterDescriptor<Boolean>USE_MULTITHREADINGThisGeneralParameterValuecan be provided to theGridCoverageReaders 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 Constructor Description JP2KFormat()Creates an instance and sets the metadata.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccepts(Object input, Hints hints)Tells me if thisFormatcan read the providedinput.GeoToolsWriteParamsgetDefaultImageIOWriteParameters()Returns an instance ofImageWriteParamthat can be used to control a subsequentGridCoverageWriter.write(org.geotools.api.coverage.grid.GridCoverage, org.geotools.api.parameter.GeneralParameterValue[]);AbstractGridCoverage2DReadergetReader(Object source)Gets aGridCoverageReaderfor this format able to create coverages out of thesourceobject.AbstractGridCoverage2DReadergetReader(Object source, Hints hints)Gets aGridCoverageReaderfor this format able to create coverages out of thesourceobject using the providedhints.GridCoverageWritergetWriter(Object destination)Retrieves aGridCoverageWritersuitable for writing to the provideddestinationwith this format.GridCoverageWritergetWriter(Object destination, Hints hints)Call the accepts() method before asking for a writer to determine if the current object is supported.protected voidsetInfo()Sets the metadata information.-
Methods inherited from class AbstractGridFormat
accepts, equals, getDefaultCRS, getDescription, getDocURL, getName, 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
ThisGeneralParameterValuecan be provided to theGridCoverageReaders 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.
-
-
Method Detail
-
setInfo
protected void setInfo()
Sets the metadata information.
-
getReader
public AbstractGridCoverage2DReader getReader(Object source, Hints hints)
Description copied from class:AbstractGridFormatGets aGridCoverageReaderfor this format able to create coverages out of thesourceobject using the providedhints.In case this
Formatcannot reader the providedsourceobjectnullis returned.- Specified by:
getReaderin classAbstractGridFormat- Parameters:
source- The source object to parse. *hints- TheHintsto use when trying to instantiate this reader.- Returns:
- A reader for this
Formator null. - See Also:
org.geotools.data.coverage.grid.AbstractGridFormat#getReader(Object, Hints)
-
getReader
public AbstractGridCoverage2DReader getReader(Object source)
Description copied from class:AbstractGridFormatGets aGridCoverageReaderfor this format able to create coverages out of thesourceobject.In case this
Formatcannot reader the providedsourceobjectnullis returned.- Specified by:
getReaderin classAbstractGridFormat- Parameters:
source- The source object to parse.- Returns:
- A reader for this
Formator null. - See Also:
org.geotools.data.coverage.grid.AbstractGridFormat#getReader(Object)
-
getWriter
public GridCoverageWriter getWriter(Object destination)
Description copied from class:AbstractGridFormatRetrieves aGridCoverageWritersuitable for writing to the provideddestinationwith this format.In case no writers are available
nullis returned.- Specified by:
getWriterin classAbstractGridFormat- Parameters:
destination- The destinatin where to write.- Returns:
- A
GridCoverageWritersuitable for writing to the provideddestinationwith this format. - See Also:
Actually, the plugin does not support write capabilities. The method throws an .
-
getDefaultImageIOWriteParameters
public GeoToolsWriteParams getDefaultImageIOWriteParameters()
Description copied from class:AbstractGridFormatReturns an instance ofImageWriteParamthat can be used to control a subsequentGridCoverageWriter.write(org.geotools.api.coverage.grid.GridCoverage, org.geotools.api.parameter.GeneralParameterValue[]);Be careful with using the
ImageWriteParamsince their usage is still experimental.- Specified by:
getDefaultImageIOWriteParametersin 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:AbstractGridFormatCall the accepts() method before asking for a writer to determine if the current object is supported.- Specified by:
getWriterin classAbstractGridFormat- Parameters:
destination- the destination object to write a WorldImage tohints-Hintsto 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:AbstractGridFormatTells me if thisFormatcan read the providedinput.- Specified by:
acceptsin classAbstractGridFormat- Parameters:
input- The input object to test for suitability.hints-Hintsto 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)
-
-