Class ImageMosaicFormat

  • All Implemented Interfaces:
    Format

    public final class ImageMosaicFormat
    extends AbstractGridFormat
    implements Format
    AbstractGridFormat subclass for controlling ImageMosaicReader creation. As the name says, it handles mosaic of georeferenced images, which means
    1. tiff+tfw+prj
    2. jpeg+tfw+prj
    3. png+tfw+prj
    4. geotiff
    This does not mean that you throw there a couple of images and it will do the trick no matter how these images are. Requirements are:
    • (almost) equal spatial resolution
    • same number of bands
    • same data type
    • same projection
    The first requirement can be relaxed a little but if they have the same spatial resolution the performances are much better. There are parameters that you can use to control the behaviour of the mosaic in terms of thresholding and transparency. They are as follows:
    • --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 Detail

      • OUTPUT_TRANSPARENT_COLOR

        public static final ParameterDescriptor<Color> OUTPUT_TRANSPARENT_COLOR
        Control the transparency of the output coverage.
      • MAX_ALLOWED_TILES

        public static final ParameterDescriptor<Integer> MAX_ALLOWED_TILES
        Control the thresholding on the input coverage
      • DEFAULT_ARTIFACTS_FILTER_THRESHOLD

        public static final ParameterDescriptor<Integer> DEFAULT_ARTIFACTS_FILTER_THRESHOLD
        Control the default artifact filter luminance thresholding on the input coverages
      • ARTIFACTS_FILTER_PTILE_THRESHOLD

        public static final ParameterDescriptor<Double> ARTIFACTS_FILTER_PTILE_THRESHOLD
        Control the artifact filter ptile thresholding
      • VIRTUAL_NATIVE_RESOLUTION

        public static final ParameterDescriptor<double[]> 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

        public static final ParameterDescriptor<Boolean> ALLOW_MULTITHREADING
        Control the threading behavior for this plugin.
      • BACKGROUND_VALUES

        public static final ParameterDescriptor<double[]> BACKGROUND_VALUES
        Control the background values for the output coverage
      • INTERPOLATION

        public static final ParameterDescriptor<Interpolation> INTERPOLATION
        Control the interpolation to be used in mosaicking
      • ACCURATE_RESOLUTION

        public static final ParameterDescriptor<Boolean> ACCURATE_RESOLUTION
        Control the requested resolution calculation.
      • OUTPUT_TO_ALTERNATIVE_CRS

        public static final ParameterDescriptor<Boolean> 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

        public static final ParameterDescriptor<String> SORT_BY
        Optional Sorting for the granules of the mosaic.

        It does work only with DBMS as indexes

      • MERGE_BEHAVIOR

        public static final ParameterDescriptor<String> 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

        public static final ParameterDescriptor<ExcessGranulePolicy> EXCESS_GRANULE_REMOVAL
        Controls the removal of excess granules

        This 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

        public static final ParameterDescriptor<Geometry> 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

        public static final ParameterDescriptor<Double> MASKING_BUFFER_PIXELS
        Control the Masking buffering (in raster size)
      • SET_ROI_PROPERTY

        public static final ParameterDescriptor<Boolean> 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 Detail

      • ImageMosaicFormat

        public ImageMosaicFormat()
        Creates an instance and sets the metadata.