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_ORDERThisGeneralParameterValuecan be provided to theGeoTiffWriters in order to force the writer to retain the axes order.static DefaultParameterDescriptor<Boolean>WRITE_NODATAThisGeneralParameterValuecan be provided to theGeoTiffWriters to specify whether NoData should be written when available.static DefaultParameterDescriptor<Boolean>WRITE_TFWThisGeneralParameterValuecan be provided to theGeoTiffWriters 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 booleanaccepts(Object o, Hints hints)Currently, we only accept files, and we open the file to verify that it has a GeoKeyDirectory tag.GeoToolsWriteParamsgetDefaultImageIOWriteParameters()Returns an instance ofGeoTiffWriteParamsfor controlling an hypothetic writing process.GeoTiffReadergetReader(Object source)Ifsourceis a file, this will return a reader object.GeoTiffReadergetReader(Object source, Hints hints)Ifsourceis a file, this will return a reader object.GridCoverageWritergetWriter(Object destination)GridCoverageWritergetWriter(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
ThisGeneralParameterValuecan be provided to theGeoTiffWriters in order to force the writer to write a tfw file.
-
WRITE_NODATA
public static final DefaultParameterDescriptor<Boolean> WRITE_NODATA
ThisGeneralParameterValuecan be provided to theGeoTiffWriters 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
ThisGeneralParameterValuecan be provided to theGeoTiffWriters 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:
acceptsin classAbstractGridFormat- Parameters:
o- the source object to test for compatibility with this format.hints-Hintsto 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)
Ifsourceis a file, this will return a reader object. This file does not use hints in the construction of the geotiff reader.- Specified by:
getReaderin 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)
Ifsourceis a file, this will return a reader object. This file does not use hints in the construction of the geotiff reader.- Specified by:
getReaderin classAbstractGridFormat- Parameters:
source- must be a GeoTiff Filehints- Hints to pass the hypotheticGridCoverageReaderto control its behaviour.- Returns:
- a GeoTiffReader object initialized to the specified File.
-
getWriter
public GridCoverageWriter getWriter(Object destination, Hints hints)
Retrieves aGeoTiffWriterornullif the provideddestinationis suitable.This file does not use hints in the construction of the geotiff reader.
- Specified by:
getWriterin classAbstractGridFormat- Parameters:
destination- must be a GeoTiff Filehints- Hints to pass the hypotheticGridCoverageReaderto control its behaviour.- Returns:
- a GeoTiffReader object initialized to the specified File.
-
getWriter
public GridCoverageWriter getWriter(Object destination)
Retrieves aGeoTiffWriterornullif the provideddestinationis suitable.This file does not use hints in the construction of the geotiff reader.
- Specified by:
getWriterin classAbstractGridFormat- Parameters:
destination- must be a GeoTiff File- Returns:
- a GeoTiffReader object initialized to the specified File.
-
getDefaultImageIOWriteParameters
public GeoToolsWriteParams getDefaultImageIOWriteParameters()
Returns an instance ofGeoTiffWriteParamsfor controlling an hypothetic writing process.- Specified by:
getDefaultImageIOWriteParametersin classAbstractGridFormat- Returns:
- an instance of
GeoTiffWriteParams.
-
-