org.geotools.coverage.processing.operation
Class ZonalStats

Object
  extended by AbstractOperation
      extended by Operation2D
          extended by OperationJAI
              extended by BaseStatisticsOperationJAI
                  extended by ZonalStats
All Implemented Interfaces:
Serializable, Operation

public class ZonalStats
extends BaseStatisticsOperationJAI

This operation simply wraps Jai-tools Zonalstats operations described by ZonalStatsDescriptor inside 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
static String GT_SYNTHETIC_PROPERTY_APPROX_MEDIAN
          String key for getting the approx median vector.
static String GT_SYNTHETIC_PROPERTY_MAX
          String key for getting the max vector.
static String GT_SYNTHETIC_PROPERTY_MEAN
          String key for getting the mean vector.
static String GT_SYNTHETIC_PROPERTY_MEDIAN
          String key for getting the median vector.
static String GT_SYNTHETIC_PROPERTY_MIN
          String key for getting the min vector.
static String GT_SYNTHETIC_PROPERTY_RANGE
          String key for getting the range vector.
static String GT_SYNTHETIC_PROPERTY_SDEV
          String key for getting the standard deviation vector.
static String GT_SYNTHETIC_PROPERTY_SUM
          String key for getting the sum vector.
static String GT_SYNTHETIC_PROPERTY_VAR
          String key for getting the variance vector.
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
ZonalStats()
          Constructs a default "ZonalStats" operation.
 
Method Summary
protected  boolean computeOnGeophysicsValues(ParameterValueGroup parameters)
          This operation MUST be performed on the geophysics data for this GridCoverage2D.
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
prepareParameters
 
Methods inherited from class OperationJAI
createRenderedImage, deriveCategory, deriveGridCoverage, deriveName, deriveRange, deriveSampleDimension, deriveUnit, doOperation, equals, getJAI, getOperationDescriptor, getQuantitative, resampleToCommonGeometry
 
Methods inherited from class Operation2D
extractSources, getFactory
 
Methods inherited from class AbstractOperation
getDescription, getDocURL, getName, getNumSources, getParameters, getVendor, getVersion, hashCode, toString
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

LOGGER

public static final Logger LOGGER
Logger for this class.


GT_SYNTHETIC_PROPERTY_MIN

public static final String GT_SYNTHETIC_PROPERTY_MIN
String key for getting the min vector.


GT_SYNTHETIC_PROPERTY_MAX

public static final String GT_SYNTHETIC_PROPERTY_MAX
String key for getting the max vector.


GT_SYNTHETIC_PROPERTY_MEAN

public static final String GT_SYNTHETIC_PROPERTY_MEAN
String key for getting the mean vector.


GT_SYNTHETIC_PROPERTY_VAR

public static final String GT_SYNTHETIC_PROPERTY_VAR
String key for getting the variance vector.


GT_SYNTHETIC_PROPERTY_SDEV

public static final String GT_SYNTHETIC_PROPERTY_SDEV
String key for getting the standard deviation vector.


GT_SYNTHETIC_PROPERTY_RANGE

public static final String GT_SYNTHETIC_PROPERTY_RANGE
String key for getting the range vector.


GT_SYNTHETIC_PROPERTY_MEDIAN

public static final String GT_SYNTHETIC_PROPERTY_MEDIAN
String key for getting the median vector.


GT_SYNTHETIC_PROPERTY_APPROX_MEDIAN

public static final String GT_SYNTHETIC_PROPERTY_APPROX_MEDIAN
String key for getting the approx median vector.


GT_SYNTHETIC_PROPERTY_SUM

public static final String GT_SYNTHETIC_PROPERTY_SUM
String key for getting the sum vector.

Constructor Detail

ZonalStats

public ZonalStats()
           throws OperationNotFoundException
Constructs a default "ZonalStats" operation.

Throws:
OperationNotFoundException
Method Detail

computeOnGeophysicsValues

protected boolean computeOnGeophysicsValues(ParameterValueGroup parameters)
This operation MUST be performed on the geophysics data for this GridCoverage2D.

Overrides:
computeOnGeophysicsValues in class Operation2D
Parameters:
parameters - ParameterValueGroup that describes this operation
Returns:
always true.
See Also:
GridCoverage2D.geophysics(boolean)

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:
getProperties in class OperationJAI
Parameters:
data - The RenderedImage created by this operation.
crs - The coordinate reference system assigned to the coverage this OperationJAI will produce.
name - The name assigned to the coverage this OperationJAI will produce.
toCRS - The transform from grid to crs to be assigned to the coverage this OperationJAI will produce.
sources - The sources to be assigned to the coverage this OperationJAI will produce.
parameters - The parameters that were used by this OperationJAI.
Returns:
a Map with the properties generated by this OperationJAI or null if we haven't any.
See Also:
OperationJAI#getProperties(RenderedImage, CoordinateReferenceSystem, InternationalString, MathTransform, GridCoverage2D[], org.geotools.coverage.processing.OperationJAI.Parameters),


Copyright © 1996-2014 Geotools. All Rights Reserved.