public abstract class AbstractGridFormat extends Object implements Format
For example the ArcGridFormat has the following method which sets up all the required
information: private void setInfo(){ HashMap info=new
HashMap(); info.put("name", "ArcGrid"); info.put("description", "Arc Grid
Coverage Format"); info.put("vendor", "Geotools"); info.put("docURL",
"http://gdal.velocet.ca/projects/aigrid/index.html"); info.put("version",
"1.0"); mInfo=info; readParameters=new GeneralParameterDescriptor[2];
readParameters[0]=ArcGridOperationParameter.getGRASSReadParam();
readParameters[0]=ArcGridOperationParameter.getCompressReadParam();
writeParameters=new GeneralParameterDescriptor[2];
writeParameters[0]=ArcGridOperationParameter.getGRASSWriteParam();
writeParameters[0]=ArcGridOperationParameter.getCompressWriteParam();
}
| Modifier and Type | Field and Description |
|---|---|
static ParameterDescriptor<Color> |
BACKGROUND_COLOR
Control the background color to be used where the input was transparent
|
static DefaultParameterDescriptor<int[]> |
BANDS
This
GeneralParameterValue can be provided to the GridCoverageReaders through
the GridCoverageReader#read(GeneralParameterValue[]) method to specify the band
indices of the input grid coverage that are going to be in the resulting coverage. |
static ParameterDescriptor<DecimationPolicy> |
DECIMATION_POLICY
This
GeneralParameterValue can be provided to the GridCoverageReaders through
the GridCoverageReader#read(GeneralParameterValue[]) method in order to specify the
policy a reader should adopt when setting read parameters when evaluating a needed
resolution. |
static ParameterDescriptor<List> |
ELEVATION
Optional Elevation value for this mosaic.
|
static ParameterDescriptor<String> |
FOOTPRINT_BEHAVIOR
Control the footprint management.
|
static DefaultParameterDescriptor<GeoToolsWriteParams> |
GEOTOOLS_WRITE_PARAMS
This
GeneralParameterValue can be provided to the GridCoverageWriters through
the GridCoverageWriter#write(org.opengis.coverage.grid.GridCoverage,
GeneralParameterValue[]) method in order to control the writing process in terms of
compression, tiling, etc.GridGeometry2D |
static ParameterDescriptor<Color> |
INPUT_TRANSPARENT_COLOR
Control the transparency of the input coverages.
|
static ParameterDescriptor<Interpolation> |
INTERPOLATION
Control the interpolation to be used in the eventual image processing done while reading data
|
protected Map<String,String> |
mInfo
The Map object is used by the information methods(such as getName()) as a data source.
|
static DefaultParameterDescriptor<OverviewPolicy> |
OVERVIEW_POLICY
This
GeneralParameterValue can be provided to the GridCoverageReaders through
the GridCoverageReader#read(GeneralParameterValue[]) method in order to specify the
policy a reader should adopt when choosing the right overview during a read operation. |
static DefaultParameterDescriptor<ProgressListener> |
PROGRESS_LISTENER
This
GeneralParameterValue can be provided to the GridCoverageReaders through
the GridCoverageReader#write(GeneralParameterValue[]) method in order to monitor a
writing process |
static DefaultParameterDescriptor<GridGeometry2D> |
READ_GRIDGEOMETRY2D
This
GeneralParameterValue can be provided to the GridCoverageReaders through
the GridCoverageReader#read(GeneralParameterValue[]) method in order to pick up the
best matching resolution level and (soon) the best matching area. |
protected ParameterValueGroup |
readParameters
ParameterValueGroup that controls the reading process for a GridCoverageReader through the GridCoverageReader.read(org.opengis.parameter.GeneralParameterValue[]) method. |
static DefaultParameterDescriptor<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 String |
TILE_SIZE_SEPARATOR |
static ParameterDescriptor<List> |
TIME
Optional Time value for this mosaic.
|
static DefaultParameterDescriptor<Boolean> |
USE_JAI_IMAGEREAD
This
GeneralParameterValue can be provided to the GridCoverageReaders through
the GridCoverageReader.read(GeneralParameterValue[]) method in order to specify the
type of image read operation requested: using a JAI ImageRead operation (leveraging on
Deferred Execution Model, Tile Caching,...), or the direct ImageReader's read
methods. |
protected ParameterValueGroup |
writeParameters
ParameterValueGroup that controls the writing process for a GridCoverageWriter through the GridCoverageWriter.write(org.opengis.coverage.grid.GridCoverage,
org.opengis.parameter.GeneralParameterValue[]) method. |
| Constructor and Description |
|---|
AbstractGridFormat() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accepts(Object source)
Tells me if this
Format can read the provided input. |
abstract boolean |
accepts(Object source,
Hints hints)
Tells me if this
Format can read the provided input. |
boolean |
equals(Format f) |
static CoordinateReferenceSystem |
getDefaultCRS()
getDefaultCRS
This method provides the user with a default crs WGS84
|
abstract 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. |
String |
getDescription()
Description of the file format.
|
String |
getDocURL()
Documentation URL for the format.
|
String |
getName()
Name of the file format.
|
abstract AbstractGridCoverage2DReader |
getReader(Object source)
Gets a
GridCoverageReader for this format able to create coverages out of the
source object. |
abstract AbstractGridCoverage2DReader |
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()
Retrieve the parameter information for a
read operation. |
String |
getVendor()
Vendor or agency for the format.
|
String |
getVersion()
Version number of the format.
|
ParameterValueGroup |
getWriteParameters()
Retrieve the parameter information for a
write operation. |
abstract GridCoverageWriter |
getWriter(Object destination)
Retrieves a
GridCoverageWriter suitable for writing to the provided destination
with this format. |
abstract GridCoverageWriter |
getWriter(Object destination,
Hints hints)
Call the accepts() method before asking for a writer to determine if the current object is
supported.
|
protected Map<String,String> mInfo
protected ParameterValueGroup readParameters
ParameterValueGroup that controls the reading process for a GridCoverageReader through the GridCoverageReader.read(org.opengis.parameter.GeneralParameterValue[]) method.protected ParameterValueGroup writeParameters
ParameterValueGroup that controls the writing process for a GridCoverageWriter through the GridCoverageWriter.write(org.opengis.coverage.grid.GridCoverage,
org.opengis.parameter.GeneralParameterValue[]) method.public static final DefaultParameterDescriptor<GridGeometry2D> READ_GRIDGEOMETRY2D
GeneralParameterValue can be provided to the GridCoverageReaders through
the GridCoverageReader#read(GeneralParameterValue[]) method in order to pick up the
best matching resolution level and (soon) the best matching area.public static final DefaultParameterDescriptor<ProgressListener> PROGRESS_LISTENER
GeneralParameterValue can be provided to the GridCoverageReaders through
the GridCoverageReader#write(GeneralParameterValue[]) method in order to monitor a
writing processpublic static final DefaultParameterDescriptor<GeoToolsWriteParams> GEOTOOLS_WRITE_PARAMS
GeneralParameterValue can be provided to the GridCoverageWriters through
the GridCoverageWriter#write(org.opengis.coverage.grid.GridCoverage,
GeneralParameterValue[]) method in order to control the writing process in terms of
compression, tiling, etc.GridGeometry2Dpublic static final DefaultParameterDescriptor<Boolean> USE_JAI_IMAGEREAD
GeneralParameterValue can be provided to the GridCoverageReaders through
the GridCoverageReader.read(GeneralParameterValue[]) method in order to specify the
type of image read operation requested: using a JAI ImageRead operation (leveraging on
Deferred Execution Model, Tile Caching,...), or the direct ImageReader's read
methods.public static final DefaultParameterDescriptor<OverviewPolicy> OVERVIEW_POLICY
GeneralParameterValue can be provided to the GridCoverageReaders through
the GridCoverageReader#read(GeneralParameterValue[]) method in order to specify the
policy a reader should adopt when choosing the right overview during a read operation.public static final ParameterDescriptor<DecimationPolicy> DECIMATION_POLICY
GeneralParameterValue can be provided to the GridCoverageReaders through
the GridCoverageReader#read(GeneralParameterValue[]) method in order to specify the
policy a reader should adopt when setting read parameters when evaluating a needed
resolution.public static final DefaultParameterDescriptor<String> SUGGESTED_TILE_SIZE
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.public static final DefaultParameterDescriptor<int[]> BANDS
GeneralParameterValue can be provided to the GridCoverageReaders through
the GridCoverageReader#read(GeneralParameterValue[]) method to specify the band
indices of the input grid coverage that are going to be in the resulting coverage. The order
of the bands on the output coverage is the order of the indices in the parameter. Value
should be an integer array (int[]) containing the band indices in the desired order.
Duplicate or multiple appearances of the same band index are allowed.public static final String TILE_SIZE_SEPARATOR
public static final ParameterDescriptor<Color> INPUT_TRANSPARENT_COLOR
public static final ParameterDescriptor<Color> BACKGROUND_COLOR
public static final ParameterDescriptor<List> TIME
public static final ParameterDescriptor<List> ELEVATION
public static final ParameterDescriptor<Interpolation> INTERPOLATION
public static final ParameterDescriptor<String> FOOTPRINT_BEHAVIOR
public String getName()
FormatgetName in interface FormatFormat.getName()public String getDescription()
Formatnull.getDescription in interface FormatFormat.getDescription()public String getVendor()
FormatgetVendor in interface FormatFormat.getVendor()public String getDocURL()
FormatgetDocURL in interface FormatFormat.getDocURL()public String getVersion()
FormatgetVersion in interface FormatFormat.getVersion()public abstract AbstractGridCoverage2DReader getReader(Object source)
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.
source - The source object to parse.Format or null.public abstract AbstractGridCoverage2DReader getReader(Object source, Hints hints)
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.
public abstract GridCoverageWriter getWriter(Object destination)
GridCoverageWriter suitable for writing to the provided destination
with this format.
In case no writers are available null is returned.
destination - The destinatin where to write.GridCoverageWriter suitable for writing to the provided destination
with this format.public boolean accepts(Object source)
Format can read the provided input.input - The input object to test for suitability.public abstract boolean accepts(Object source, Hints hints)
Format can read the provided input.input - The input object to test for suitability.hints - Hints to control the accepts internal machinery.public boolean equals(Format f)
org.geotools.data.coverage.grid.Format#equals(org.geotools.data.coverage.grid.Format)public ParameterValueGroup getReadParameters()
Formatread operation.getReadParameters in interface Formatpublic ParameterValueGroup getWriteParameters()
Formatwrite operation.getWriteParameters in interface Formatpublic static CoordinateReferenceSystem getDefaultCRS()
This method provides the user with a default crs WGS84
public abstract GeoToolsWriteParams getDefaultImageIOWriteParameters()
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.
ImageWriteParam.public abstract GridCoverageWriter getWriter(Object destination, Hints hints)
destination - the destination object to write a WorldImage tohints - Hints to control the internal machinery.Copyright © 1996–2019 Geotools. All rights reserved.