| org.geotools.coverage.processing.AbstractStatisticsOperationJAI org.geotools.coverage.processing.operation.Extrema
Extrema | public class Extrema extends AbstractStatisticsOperationJAI (Code) | | 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 na successive
versions of this operation are to add the ability to 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 maixumum 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]);
author: Simone Giannecchini since: 2.4 |
Constructor Summary | |
public | Extrema() Constructs a default
"Extrema" operation. |
Method Summary | |
protected boolean | computeOnGeophysicsValues(ParameterValueGroup parameters) This operation MUST be performed on the geophysics data for this
GridCoverage2D . | protected Map | getProperties(RenderedImage data, CoordinateReferenceSystem crs, InternationalString name, MathTransform toCRS, GridCoverage2D[] sources, Parameters parameters) Prepare the minimum and maximum properties for this extream operation. |
GT_SYNTHETIC_PROPERTY_MAXIMUM | final public static String GT_SYNTHETIC_PROPERTY_MAXIMUM(Code) | | String key for getting the maximum vector.
|
GT_SYNTHETIC_PROPERTY_MINIMUM | final public static String GT_SYNTHETIC_PROPERTY_MINIMUM(Code) | | String key for getting the minimum vector.
|
Extrema | public Extrema() throws OperationNotFoundException(Code) | | Constructs a default
"Extrema" operation.
|
computeOnGeophysicsValues | protected boolean computeOnGeophysicsValues(ParameterValueGroup parameters)(Code) | | This operation MUST be performed on the geophysics data for this
GridCoverage2D .
Parameters: parameters - ParameterValueGroup that describes this operation always true. |
getProperties | protected Map getProperties(RenderedImage data, CoordinateReferenceSystem crs, InternationalString name, MathTransform toCRS, GridCoverage2D[] sources, Parameters parameters)(Code) | | Prepare the minimum and maximum properties for this extream operation.
See ExtremaDescriptor
for more info.
See Also: OperationJAI#getProperties(RenderedImage, CoordinateReferenceSystem,
* InternationalString, MathTransform, GridCoverage2D[],
* org.geotools.coverage.processing.OperationJAI.Parameters), |
Methods inherited from org.geotools.coverage.processing.AbstractStatisticsOperationJAI | protected ParameterBlockJAI prepareParameters(ParameterValueGroup parameters)(Code)(Java Doc)
|
|
|