Package org.geotools.coverage.processing
Class BaseStatisticsOperationJAI
- Object
-
- AbstractOperation
-
- Operation2D
-
- OperationJAI
-
- BaseStatisticsOperationJAI
-
- All Implemented Interfaces:
Serializable,Operation
- Direct Known Subclasses:
Extrema,Histogram,ZonalStatistics,ZonalStats
public abstract class BaseStatisticsOperationJAI extends OperationJAI
This class is the root class for the Statistics operations based onJAI'sStatisticsOpImagelike Extrema and Histogram. It provides basic capabilities for management of geospatial parameters likeROIs and subsampling factors.- Since:
- 2.4.x
- Author:
- Simone Giannecchini
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class OperationJAI
OperationJAI.Parameters
-
-
Field Summary
Fields Modifier and Type Field Description static LoggerLOGGERLoggerfor this class.static ParameterDescriptor<Polygon>ROIThe parameter descriptor for the Region Of Interest.static ParameterDescriptor<Double>SPATIAL_SUBSAMPLING_XThe parameter descriptor for the SPATIAL_SUBSAMPLING_Xstatic ParameterDescriptor<Double>SPATIAL_SUBSAMPLING_YThe parameter descriptor for the SPATIAL_SUBSAMPLING_Y-
Fields inherited from class OperationJAI
operation, RENDERED_MODE
-
Fields inherited from class Operation2D
PRIMARY_SOURCE_INDEX, SOURCE_0
-
Fields inherited from class AbstractOperation
descriptor
-
-
Constructor Summary
Constructors Constructor Description BaseStatisticsOperationJAI(String name)Constructor forBaseStatisticsOperationJAI.BaseStatisticsOperationJAI(String name, OperationDescriptor operationDescriptor)Constructor forBaseStatisticsOperationJAI.BaseStatisticsOperationJAI(OperationDescriptor operationDescriptor)Constructor forBaseStatisticsOperationJAI.BaseStatisticsOperationJAI(OperationDescriptor operationDescriptor, ImagingParameterDescriptors replacements)Constructor forBaseStatisticsOperationJAI.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static PolygonconvertPolygon(Polygon roiInput, MathTransform worldToGridTransform)Converte a JTSPolygon, which represents a ROI, into an AWTPolygonby means of the providedMathTransform.protected ParameterBlockJAIprepareParameters(ParameterValueGroup parameters)Copies parameter values from the specifiedParameterValueGroupto theParameterBlockJAI-
Methods inherited from class OperationJAI
createRenderedImage, deriveCategory, deriveGridCoverage, deriveName, deriveRange, deriveSampleDimension, deriveUnit, doOperation, equals, extractSources, getJAI, getOperationDescriptor, getProperties, getQuantitative, handleJAIEXTParams, handleROINoDataInternal, handleROINoDataProperties, hashCode, resampleToCommonGeometry
-
Methods inherited from class Operation2D
extractSources, getFactory
-
Methods inherited from class AbstractOperation
getDescription, getDocURL, getName, getNumSources, getParameters, getVendor, getVersion, toString
-
-
-
-
Field Detail
-
SPATIAL_SUBSAMPLING_X
public static final ParameterDescriptor<Double> SPATIAL_SUBSAMPLING_X
The parameter descriptor for the SPATIAL_SUBSAMPLING_X
-
SPATIAL_SUBSAMPLING_Y
public static final ParameterDescriptor<Double> SPATIAL_SUBSAMPLING_Y
The parameter descriptor for the SPATIAL_SUBSAMPLING_Y
-
ROI
public static final ParameterDescriptor<Polygon> ROI
The parameter descriptor for the Region Of Interest.
-
-
Constructor Detail
-
BaseStatisticsOperationJAI
public BaseStatisticsOperationJAI(OperationDescriptor operationDescriptor)
Constructor forBaseStatisticsOperationJAI.- Parameters:
operationDescriptor-OperationDescriptorfor the underlying JAI operation.
-
BaseStatisticsOperationJAI
public BaseStatisticsOperationJAI(OperationDescriptor operationDescriptor, ImagingParameterDescriptors replacements)Constructor forBaseStatisticsOperationJAI.- Parameters:
operationDescriptor-OperationDescriptorfor the underlying JAI operation.replacements-ImagingParameterDescriptorsthat should replace the correspondentImagingParametersin order to change the default behavior they have inside JAI.
-
BaseStatisticsOperationJAI
public BaseStatisticsOperationJAI(String name, OperationDescriptor operationDescriptor)
Constructor forBaseStatisticsOperationJAI.- Parameters:
name- of the underlying JAI operation.
-
BaseStatisticsOperationJAI
public BaseStatisticsOperationJAI(String name)
Constructor forBaseStatisticsOperationJAI.- Parameters:
name- of the underlying JAI operation.
-
-
Method Detail
-
prepareParameters
protected ParameterBlockJAI prepareParameters(ParameterValueGroup parameters)
Copies parameter values from the specifiedParameterValueGroupto theParameterBlockJAI- Overrides:
prepareParametersin classOperationJAI- Parameters:
parameters- TheParameterValueGroupto be copied.- Returns:
- A copy of the provided
ParameterValueGroupas a JAI block. - See Also:
OperationJAI.prepareParameters(org.geotools.api.parameter.ParameterValueGroup)
-
convertPolygon
protected static Polygon convertPolygon(Polygon roiInput, MathTransform worldToGridTransform) throws TransformException
Converte a JTSPolygon, which represents a ROI, into an AWTPolygonby means of the providedMathTransform.- Parameters:
roiInput- the input ROI as a JTSPolygon.worldToGridTransform- theMathTransformto apply to the input ROI.- Returns:
- an AWT
Polygon. - Throws:
TransformException- in case the providedMathTransformchokes.
-
-