Class ZonalStats
-
- All Implemented Interfaces:
Serializable,Operation
public class ZonalStats extends BaseStatisticsOperationJAI
This operation simply wraps Jai-tools Zonalstats operations described byZonalStatsDescriptorinside a GeoTools operation in order to make it spatial-aware.- Author:
- Andrea Antonello (www.hydrologis.com), Daniele Romagnoli, 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 StringGT_SYNTHETIC_PROPERTY_APPROX_MEDIANStringkey for getting the approx median vector.static StringGT_SYNTHETIC_PROPERTY_MAXStringkey for getting the max vector.static StringGT_SYNTHETIC_PROPERTY_MEANStringkey for getting the mean vector.static StringGT_SYNTHETIC_PROPERTY_MEDIANStringkey for getting the median vector.static StringGT_SYNTHETIC_PROPERTY_MINStringkey for getting the min vector.static StringGT_SYNTHETIC_PROPERTY_RANGEStringkey for getting the range vector.static StringGT_SYNTHETIC_PROPERTY_SDEVStringkey for getting the standard deviation vector.static StringGT_SYNTHETIC_PROPERTY_SUMStringkey for getting the sum vector.static StringGT_SYNTHETIC_PROPERTY_VARStringkey for getting the variance vector.static LoggerLOGGERLoggerfor 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 ZonalStats()Constructs a default"ZonalStats"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)Prepare the properties for this ZonalStats operation.-
Methods inherited from class BaseStatisticsOperationJAI
convertPolygon, prepareParameters
-
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_MIN
public static final String GT_SYNTHETIC_PROPERTY_MIN
Stringkey for getting the min vector.
-
GT_SYNTHETIC_PROPERTY_MAX
public static final String GT_SYNTHETIC_PROPERTY_MAX
Stringkey for getting the max vector.
-
GT_SYNTHETIC_PROPERTY_MEAN
public static final String GT_SYNTHETIC_PROPERTY_MEAN
Stringkey for getting the mean vector.
-
GT_SYNTHETIC_PROPERTY_VAR
public static final String GT_SYNTHETIC_PROPERTY_VAR
Stringkey for getting the variance vector.
-
GT_SYNTHETIC_PROPERTY_SDEV
public static final String GT_SYNTHETIC_PROPERTY_SDEV
Stringkey for getting the standard deviation vector.
-
GT_SYNTHETIC_PROPERTY_RANGE
public static final String GT_SYNTHETIC_PROPERTY_RANGE
Stringkey for getting the range vector.
-
GT_SYNTHETIC_PROPERTY_MEDIAN
public static final String GT_SYNTHETIC_PROPERTY_MEDIAN
Stringkey for getting the median vector.
-
GT_SYNTHETIC_PROPERTY_APPROX_MEDIAN
public static final String GT_SYNTHETIC_PROPERTY_APPROX_MEDIAN
Stringkey for getting the approx median vector.
-
-
Constructor Detail
-
ZonalStats
public ZonalStats() throws OperationNotFoundExceptionConstructs a default"ZonalStats"operation.- Throws:
OperationNotFoundException
-
-
Method Detail
-
getProperties
protected Map<String,?> getProperties(RenderedImage data, CoordinateReferenceSystem crs, InternationalString name, MathTransform toCRS, GridCoverage2D[] sources, OperationJAI.Parameters parameters)
Prepare the properties for this ZonalStats operation.- Overrides:
getPropertiesin classOperationJAI- Parameters:
data- TheRenderedImagecreated by this operation.crs- The coordinate reference system assigned to the coverage thisOperationJAIwill produce.name- The name assigned to the coverage thisOperationJAIwill produce.toCRS- The transform from grid tocrsto be assigned to the coverage thisOperationJAIwill produce.sources- The sources to be assigned to the coverage thisOperationJAIwill produce.parameters- The parameters that were used by thisOperationJAI.- Returns:
- a
Mapwith the properties generated by thisOperationJAIor null if we haven't any.
-
-