Class Extrema

  • All Implemented Interfaces:
    Serializable, Operation

    public class Extrema
    extends BaseStatisticsOperationJAI
    This operation simply wraps JAI Extrema operations described by ExtremaDescriptor inside a GeoTools operation in order to make it spatial-aware.

    For the moment this is a very simple wrap. Plans on the 2.4 and successive versions of this operation are to add the ability to use spatial ROIs and to specific Spatial subsampling. As of now, ROI has to be a Java2D Shape subclass and the parameters to control x and y subsamplings got to be Integer, which means pixel-aware.

    For more information on how the underlying JAI operators works you can have a look here: ExtremaDescriptor

    How to use this operation Here is a very simple example on how to use this operation in order to the minimum and maximum of the source coverage. final OperationJAI op=new OperationJAI("Extrema"); ParameterValueGroup params = op.getParameters(); params.parameter("Source").setValue(coverage); coverage=(GridCoverage2D) op.doOperation(params,null); System.out.println(((double[])coverage.getProperty("minimum"))[0]); System.out.println(((double[])coverage.getProperty("minimum"))[1]); System.out.println(((double[])coverage.getProperty("minimum"))[2]); System.out.println(((double[])coverage.getProperty("maximum"))[0]); System.out.println(((double[])coverage.getProperty("maximum"))[1]); System.out.println(((double[])coverage.getProperty("maximum"))[2]);

    Since:
    2.4
    Author:
    Simone Giannecchini
    See Also:
    Serialized Form
    • Field Detail

      • LOGGER

        public static final Logger LOGGER
        Logger for this class.
      • GT_SYNTHETIC_PROPERTY_MINIMUM

        public static final String GT_SYNTHETIC_PROPERTY_MINIMUM
        String key for getting the minimum vector.
        See Also:
        Constant Field Values
      • GT_SYNTHETIC_PROPERTY_MAXIMUM

        public static final String GT_SYNTHETIC_PROPERTY_MAXIMUM
        String key for getting the maximum vector.
        See Also:
        Constant Field Values
      • GT_SYNTHETIC_PROPERTY_MIN_LOCATIONS

        public static final String GT_SYNTHETIC_PROPERTY_MIN_LOCATIONS
        Locations of min values.
        See Also:
        Constant Field Values
      • GT_SYNTHETIC_PROPERTY_MAX_LOCATIONS

        public static final String GT_SYNTHETIC_PROPERTY_MAX_LOCATIONS
        Locations of max values.
        See Also:
        Constant Field Values
    • Method Detail

      • handleJAIEXTParams

        protected void handleJAIEXTParams​(ParameterBlockJAI parameters,
                                          ParameterValueGroup parameters2)
        Description copied from class: OperationJAI
        Extension point for adding to the JAI ParameterBlockJAI object the parameters defined in the ParameterValueGroup, which can be read by the JAI-EXT operations.

        Notice that if you are using JAI, the new parameters will not be accepted by the ParameterBlockJAI instance.

        Overrides:
        handleJAIEXTParams in class OperationJAI
        Parameters:
        parameters - ParameterBlockJAI instance used by the current JAI-EXT/JAI operation
        parameters2 - ParameterValueGroup instance containing input operation parameters