Package org.geotools.gce.geotiff
Class GeoTiffFormat
- Object
-
- AbstractGridFormat
-
- GeoTiffFormat
-
- All Implemented Interfaces:
Format
public class GeoTiffFormat extends AbstractGridFormat implements Format
Provides basic information about the GeoTIFF format IO. This is currently an extension of the Geotools AbstractGridFormat because the stream and file GCEs will pick it up if it extends AbstractGridFormat.- Author:
- Bryce Nordgren, USDA Forest Service, Simone Giannecchini
-
-
Field Summary
Fields Modifier and Type Field Description static DefaultParameterDescriptor<Boolean>
RETAIN_AXES_ORDER
ThisGeneralParameterValue
can be provided to theGeoTiffWriter
s in order to force the writer to retain the axes order.static DefaultParameterDescriptor<Boolean>
WRITE_NODATA
ThisGeneralParameterValue
can be provided to theGeoTiffWriter
s to specify whether NoData should be written when available.static DefaultParameterDescriptor<Boolean>
WRITE_TFW
ThisGeneralParameterValue
can be provided to theGeoTiffWriter
s in order to force the writer to write a tfw file.-
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 GeoTiffFormat()
Creates a new instance of GeoTiffFormat
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
accepts(Object o, Hints hints)
Currently, we only accept files, and we open the file to verify that it has a GeoKeyDirectory tag.GeoToolsWriteParams
getDefaultImageIOWriteParameters()
Returns an instance ofGeoTiffWriteParams
for controlling an hypothetic writing process.GeoTiffReader
getReader(Object source)
Ifsource
is a file, this will return a reader object.GeoTiffReader
getReader(Object source, Hints hints)
Ifsource
is a file, this will return a reader object.GridCoverageWriter
getWriter(Object destination)
GridCoverageWriter
getWriter(Object destination, Hints hints)
-
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
-
WRITE_TFW
public static final DefaultParameterDescriptor<Boolean> WRITE_TFW
ThisGeneralParameterValue
can be provided to theGeoTiffWriter
s in order to force the writer to write a tfw file.
-
WRITE_NODATA
public static final DefaultParameterDescriptor<Boolean> WRITE_NODATA
ThisGeneralParameterValue
can be provided to theGeoTiffWriter
s to specify whether NoData should be written when available. Default or missing parameter means true.
-
RETAIN_AXES_ORDER
public static final DefaultParameterDescriptor<Boolean> RETAIN_AXES_ORDER
ThisGeneralParameterValue
can be provided to theGeoTiffWriter
s in order to force the writer to retain the axes order.
-
-
Method Detail
-
accepts
public boolean accepts(Object o, Hints hints)
Currently, we only accept files, and we open the file to verify that it has a GeoKeyDirectory tag. If anything more subtle is wrong with the file, we deal with that when we try and read it.- Specified by:
accepts
in classAbstractGridFormat
- Parameters:
o
- the source object to test for compatibility with this format.hints
-Hints
to control the accepts internal machinery.- Returns:
- true if "o" is a File or a URL that points to a GeoTiff with a GeoTiff file as a resource.
-
getReader
public GeoTiffReader getReader(Object source)
Ifsource
is a file, this will return a reader object. This file does not use hints in the construction of the geotiff reader.- Specified by:
getReader
in classAbstractGridFormat
- Parameters:
source
- must be a GeoTiff File- Returns:
- a GeoTiffReader object initialized to the specified File.
-
getReader
public GeoTiffReader getReader(Object source, Hints hints)
Ifsource
is a file, this will return a reader object. This file does not use hints in the construction of the geotiff reader.- Specified by:
getReader
in classAbstractGridFormat
- Parameters:
source
- must be a GeoTiff Filehints
- Hints to pass the hypotheticGridCoverageReader
to control its behaviour.- Returns:
- a GeoTiffReader object initialized to the specified File.
-
getWriter
public GridCoverageWriter getWriter(Object destination, Hints hints)
Retrieves aGeoTiffWriter
ornull
if the provideddestination
is suitable.This file does not use hints in the construction of the geotiff reader.
- Specified by:
getWriter
in classAbstractGridFormat
- Parameters:
destination
- must be a GeoTiff Filehints
- Hints to pass the hypotheticGridCoverageReader
to control its behaviour.- Returns:
- a GeoTiffReader object initialized to the specified File.
-
getWriter
public GridCoverageWriter getWriter(Object destination)
Retrieves aGeoTiffWriter
ornull
if the provideddestination
is suitable.This file does not use hints in the construction of the geotiff reader.
- Specified by:
getWriter
in classAbstractGridFormat
- Parameters:
destination
- must be a GeoTiff File- Returns:
- a GeoTiffReader object initialized to the specified File.
-
getDefaultImageIOWriteParameters
public GeoToolsWriteParams getDefaultImageIOWriteParameters()
Returns an instance ofGeoTiffWriteParams
for controlling an hypothetic writing process.- Specified by:
getDefaultImageIOWriteParameters
in classAbstractGridFormat
- Returns:
- an instance of
GeoTiffWriteParams
.
-
-