Class ZonalStatistics
- Object
-
- AbstractOperation
-
- Operation2D
-
- OperationJAI
-
- BaseStatisticsOperationJAI
-
- ZonalStatistics
-
- All Implemented Interfaces:
Serializable
,Operation
public class ZonalStatistics extends BaseStatisticsOperationJAI
This operation is similar to theZonalStats
operation but implements a new version of the "ZonalStats" operation. The main difference between the two operations is that inside this version multiple geometries are handled, instead of the old version which supports only one geometry per time.- Author:
- Nicola Lagomarsini, GeoSolutions SAS
- 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 String
GT_SYNTHETIC_PROPERTY_ZONALSTATS
String
key for getting theZoneGeometry
list.static Logger
LOGGER
Logger
for this class.-
Fields inherited from class BaseStatisticsOperationJAI
ROI, SPATIAL_SUBSAMPLING_X, 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 ZonalStatistics()
Constructs a default"ZonalStatistics"
operation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Map<String,?>
getProperties(RenderedImage data, CoordinateReferenceSystem crs, InternationalString name, MathTransform toCRS, GridCoverage2D[] sources, OperationJAI.Parameters parameters)
Prepares the properties to be given to the coverage created by thederiveGridCoverage
method.protected ParameterBlockJAI
prepareParameters(ParameterValueGroup parameters)
Copies parameter values from the specifiedParameterValueGroup
to theParameterBlockJAI
-
Methods inherited from class BaseStatisticsOperationJAI
convertPolygon
-
Methods inherited from class OperationJAI
createRenderedImage, deriveCategory, deriveGridCoverage, deriveName, deriveRange, deriveSampleDimension, deriveUnit, doOperation, equals, extractSources, getJAI, getOperationDescriptor, 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
-
GT_SYNTHETIC_PROPERTY_ZONALSTATS
public static final String GT_SYNTHETIC_PROPERTY_ZONALSTATS
String
key for getting theZoneGeometry
list.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ZonalStatistics
public ZonalStatistics() throws OperationNotFoundException
Constructs a default"ZonalStatistics"
operation.- Throws:
OperationNotFoundException
-
-
Method Detail
-
prepareParameters
protected ParameterBlockJAI prepareParameters(ParameterValueGroup parameters)
Copies parameter values from the specifiedParameterValueGroup
to theParameterBlockJAI
- Overrides:
prepareParameters
in classBaseStatisticsOperationJAI
- Parameters:
parameters
- TheParameterValueGroup
to be copied.- Returns:
- A copy of the provided
ParameterValueGroup
as a JAI block. - See Also:
OperationJAI.prepareParameters(org.geotools.api.parameter.ParameterValueGroup)
-
getProperties
protected Map<String,?> getProperties(RenderedImage data, CoordinateReferenceSystem crs, InternationalString name, MathTransform toCRS, GridCoverage2D[] sources, OperationJAI.Parameters parameters)
Description copied from class:OperationJAI
Prepares the properties to be given to the coverage created by thederiveGridCoverage
method. The default implementation returnsnull
.- Overrides:
getProperties
in classOperationJAI
- Parameters:
data
- TheRenderedImage
created by this operation.crs
- The coordinate reference system assigned to the coverage thisOperationJAI
will produce.name
- The name assigned to the coverage thisOperationJAI
will produce.toCRS
- The transform from grid tocrs
to be assigned to the coverage thisOperationJAI
will produce.sources
- The sources to be assigned to the coverage thisOperationJAI
will produce.parameters
- The parameters that were used by thisOperationJAI
.- Returns:
- a
Map
with the properties generated by thisOperationJAI
or null if we haven't any.
-
-