Package org.geotools.gce.imagemosaic
Class ImageMosaicFormat
Object
AbstractGridFormat
ImageMosaicFormat
- All Implemented Interfaces:
Format
AbstractGridFormat
subclass for controlling ImageMosaicReader
creation. As the name says, it handles
mosaic of georeferenced images, which means
- tiff+tfw+prj
- jpeg+tfw+prj
- png+tfw+prj
- geotiff
- (almost) equal spatial resolution
- same number of bands
- same data type
- same projection
- --DefaultParameterDescriptor FINAL_ALPHA = new DefaultParameterDescriptor( "FinalAlpha", Boolean.class, null, Boolean.FALSE)-- It asks the plugin to add transparency on the final created mosaic. IT simply performs a threshonding looking for areas where there is no data, i.e., intensity is really low and transform them into transparent areas. It is obvious that depending on the nature of the input images it might interfere with the original values.
- ---ALPHA_THRESHOLD = new DefaultParameterDescriptor( "AlphaThreshold", Double.class, null, Double.valueOf(1));--- Controls the transparency addition by specifying the treshold to use.
- INPUT_IMAGE_THRESHOLD = new DefaultParameterDescriptor( "InputImageROI", Boolean.class, null, Boolean.FALSE)--- INPUT_IMAGE_THRESHOLD_VALUE = new DefaultParameterDescriptor( "InputImageROIThreshold", Integer.class, null, Integer.valueOf(1));--- These two can be used to control the application of ROIs on the input images based on tresholding values. Basically using the threshold you can ask the mosaic plugin to load or not certain pixels of the original images.
- Since:
- 2.3
- Author:
- Simone Giannecchini (simboss), GeoSolutions, Stefan Alfons Krueger (alfonx), Wikisquare.de : Support for jar:file:foo.jar/bar.properties URLs
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ParameterDescriptor<Boolean>
Control the requested resolution calculation.static final ParameterDescriptor<Boolean>
Control the threading behavior for this plugin.static final ParameterDescriptor<Double>
Control the artifact filter ptile thresholdingstatic final ParameterDescriptor<double[]>
Control the background values for the output coveragestatic final ParameterDescriptor<Integer>
Control the default artifact filter luminance thresholding on the input coveragesstatic final ParameterDescriptor<ExcessGranulePolicy>
Controls the removal of excess granulesstatic final ParameterDescriptor<Boolean>
Control the type of the final mosaic.static final ParameterDescriptor<Filter>
Filter tiles based on attributes from the input coveragestatic final ParameterDescriptor<Geometry>
mask (as a polygon in native coordinates) to be applied to the produced mosaic.static final ParameterDescriptor<Interpolation>
Control the interpolation to be used in mosaickingstatic final ParameterDescriptor<Double>
Control the Masking buffering (in raster size)static final ParameterDescriptor<Integer>
Control the thresholding on the input coveragestatic final ParameterDescriptor<String>
Merging behavior for the various granules of the mosaic we are going to produce.static final ParameterDescriptor<Boolean>
When this read parameter is set to true, the reader will produce output in the requested CRS, assuming it matches one of the native CRSs, as reported by the #GridCoverage2DReader@MULTICRS_EPSGCODES metadata entry, and that the requested grid geometry is expressed in said CRS.static final ParameterDescriptor<Color>
Control the transparency of the output coverage.static final ParameterDescriptor<Boolean>
Control whether to set the ROI property in the output mosaic (as an instance, even when background values are set which usually results into setting a null ROI after the mosaic)static final ParameterDescriptor<String>
Optional Sorting for the granules of the mosaic.static final ParameterDescriptor<double[]>
Defines a virtual native resolution.Fields inherited from class AbstractGridFormat
BACKGROUND_COLOR, BANDS, DECIMATION_POLICY, ELEVATION, FOOTPRINT_BEHAVIOR, GEOTOOLS_WRITE_PARAMS, INPUT_TRANSPARENT_COLOR, mInfo, OVERVIEW_POLICY, PROGRESS_LISTENER, READ_GRIDGEOMETRY2D, readParameters, RESCALE_PIXELS, SUGGESTED_TILE_SIZE, TILE_SIZE_SEPARATOR, TIME, USE_JAI_IMAGEREAD, writeParameters
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Tells me if thisFormat
can read the providedinput
.boolean
Tells me if thisFormat
can read the providedinput
.Throw an exception since this plugin is readonly.Gets aGridCoverageReader
for this format able to create coverages out of thesource
object.Gets aGridCoverageReader
for this format able to create coverages out of thesource
object using the providedhints
.Retrieves aGridCoverageWriter
suitable for writing to the provideddestination
with this format.Call the accepts() method before asking for a writer to determine if the current object is supported.Methods inherited from class AbstractGridFormat
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 Details
-
FILTER
Filter tiles based on attributes from the input coverage -
FADING
Control the type of the final mosaic. -
OUTPUT_TRANSPARENT_COLOR
Control the transparency of the output coverage. -
MAX_ALLOWED_TILES
Control the thresholding on the input coverage -
DEFAULT_ARTIFACTS_FILTER_THRESHOLD
Control the default artifact filter luminance thresholding on the input coverages -
ARTIFACTS_FILTER_PTILE_THRESHOLD
Control the artifact filter ptile thresholding -
VIRTUAL_NATIVE_RESOLUTION
Defines a virtual native resolution. It virtually represents the native resolution to be used after reading a dataset before doing any other operation. It could be useful to limit somehow the data quality offered to the final user. As an instance if we have data at resolutions 0.5m, 1m, 2m, 4m, 8m and the virtual native resolution is 4m, and the request is looking for data at 2m resolution we should downsample the best nearest level to 4m and then get back at 2m. This will result in potentially pixellated output. When specified, values should be always positive. -
ALLOW_MULTITHREADING
Control the threading behavior for this plugin. -
BACKGROUND_VALUES
Control the background values for the output coverage -
INTERPOLATION
Control the interpolation to be used in mosaicking -
ACCURATE_RESOLUTION
Control the requested resolution calculation. -
OUTPUT_TO_ALTERNATIVE_CRS
When this read parameter is set to true, the reader will produce output in the requested CRS, assuming it matches one of the native CRSs, as reported by the #GridCoverage2DReader@MULTICRS_EPSGCODES metadata entry, and that the requested grid geometry is expressed in said CRS. When set to false (default), then only the native CRS declared by #GridCoverage2DReader@getCoordinateReferenceSystem will be produced in output -
SORT_BY
Optional Sorting for the granules of the mosaic.It does work only with DBMS as indexes
-
MERGE_BEHAVIOR
Merging behavior for the various granules of the mosaic we are going to produce.This parameter controls whether we want to merge in a single mosaic or stack all the bands into the final mosaic.
-
EXCESS_GRANULE_REMOVAL
Controls the removal of excess granulesThis parameter controls whether the mosaic will attempt to remove excess granules, that is, granules not contributing pixels to the output, before performing the mosaicking. This is useful only if granules are overlapping, do not enable otherwise.
-
GEOMETRY_MASK
mask (as a polygon in native coordinates) to be applied to the produced mosaic. At the moment, it will be ignored in case of Heterogeneous CRS. -
MASKING_BUFFER_PIXELS
Control the Masking buffering (in raster size) -
SET_ROI_PROPERTY
Control whether to set the ROI property in the output mosaic (as an instance, even when background values are set which usually results into setting a null ROI after the mosaic)
-
-
Constructor Details
-
ImageMosaicFormat
public ImageMosaicFormat()Creates an instance and sets the metadata.
-
-
Method Details
-
getReader
Description copied from class:AbstractGridFormat
Gets aGridCoverageReader
for this format able to create coverages out of thesource
object.In case this
Format
cannot reader the providedsource
objectnull
is returned.- Specified by:
getReader
in classAbstractGridFormat
- 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
Description copied from class:AbstractGridFormat
Retrieves aGridCoverageWriter
suitable for writing to the provideddestination
with this format.In case no writers are available
null
is returned.- Specified by:
getWriter
in classAbstractGridFormat
- Parameters:
destination
- The destinatin where to write.- Returns:
- A
GridCoverageWriter
suitable for writing to the provideddestination
with this format.
-
accepts
Description copied from class:AbstractGridFormat
Tells me if thisFormat
can read the providedinput
.- Specified by:
accepts
in classAbstractGridFormat
- Parameters:
source
- The input object to test for suitability.hints
-Hints
to control the accepts internal machinery.- Returns:
- True if this format can read this object, False otherwise.
-
accepts
Description copied from class:AbstractGridFormat
Tells me if thisFormat
can read the providedinput
.- Overrides:
accepts
in classAbstractGridFormat
- Parameters:
source
- The input object to test for suitability.- Returns:
- True if this format can read this object, False otherwise.
- See Also:
-
org.geotools.data.coverage.grid.AbstractGridFormat#accepts(Object input)
-
getReader
Description copied from class:AbstractGridFormat
Gets aGridCoverageReader
for this format able to create coverages out of thesource
object using the providedhints
.In case this
Format
cannot reader the providedsource
objectnull
is returned.- Specified by:
getReader
in classAbstractGridFormat
- Parameters:
source
- The source object to parse. *hints
- TheHints
to use when trying to instantiate this reader.- Returns:
- A reader for this
Format
or null. - See Also:
-
getDefaultImageIOWriteParameters
Throw an exception since this plugin is readonly.- Specified by:
getDefaultImageIOWriteParameters
in classAbstractGridFormat
- Returns:
- nothing.
-
getWriter
Description copied from class:AbstractGridFormat
Call the accepts() method before asking for a writer to determine if the current object is supported.- Specified by:
getWriter
in classAbstractGridFormat
- Parameters:
destination
- the destination object to write a WorldImage tohints
-Hints
to control the internal machinery.- Returns:
- a new WorldImageWriter for the destination
-