public class ZonalStatsDescriptor
extends javax.media.jai.OperationDescriptorImpl
OperationDescriptor
describing the Zonal Statistics operation.
The ZonalStats operation takes in input a source image, an optional classifier image and a list of geometries on which the selected statistics are
calculated. These statistics are defined by the input Statistics.StatsType
array. The calculations can NoData. It is important to remember that the
classifier must be of integral data type.The possible statistics are:
It is important to remember that if the Median, Mode or Histogram operations must be executed, even their Bounds and Bin numbers must be defined.
The source can have all the possible JAI accepted data types. The statistical calculations are performed on every tile with an adequate
synchronization and stored inside an instance of the ZoneGeometry
class. For avoiding concurrency issues, the statistic calculation is done
in a synchronized block. The statistical results are returned by calling the getProperty() method. The calculation happens only the first time for
avoiding unnecessary loss of time.
The results are returned by the getProperty() method as a List
Name | Value |
---|---|
GlobalName | Zonal |
LocalName | Zonal |
Vendor | it.geosolutions.jaiext |
Description | Image operator for calculating statistics on different image zones supporting ROI and No Data. |
DocURL | Not Defined |
Version | 1.0 |
arg0Desc | Classifier image. |
arg1Desc | Transformation object used for mapping the Source image to the classifier. |
arg2Desc | List of all the geometries to analyze. |
arg3Desc | No Data Range used. |
arg4Desc | ROI Object used. |
arg5Desc | Boolean indicatin if the ROI RasterAccessor should be used during computations. |
arg6Desc | Array containing the indexes of the bands to calculate. |
arg7Desc | Array indicating which statistical operations must be performed on all the selected bands. |
arg8Desc | Array indicating the minimum bounds for complex statistics on all the selected bands. |
arg9Desc | Array indicating the maximum bounds for complex statistics on all the selected bands. |
arg10Desc | Array indicating the number of bins for complex statistics on all the selected bands. |
arg11Desc | List of the possible ranges for dividing the statistics. |
arg12Desc | Boolean indicating if the results must be calculated for each range. |
Name | Class Type | Default Value |
---|---|---|
classifier | RenderedImage | null |
transform | AffineTransform | null |
roilist | List | null |
noData | it.geosolutions.jaiext.range.Range | null |
mask | javax.media.jai.ROI | null |
useROIAccessor | Boolean | false |
bands | int[] | null |
stats | it.geosolutions.jaiext.stats.Statistics.StatsType[] | null |
minbound | double[] | null |
maxbound | double[] | null |
numbin | int[] | null |
rangeData | List | null |
localStats | Boolean | false |
Modifier and Type | Field and Description |
---|---|
static String |
ZS_PROPERTY
Zonal Statistics property name
|
Constructor and Description |
---|
ZonalStatsDescriptor() |
Modifier and Type | Method and Description |
---|---|
static javax.media.jai.RenderedOp |
create(RenderedImage source,
RenderedImage classifier,
AffineTransform transform,
List<javax.media.jai.ROI> roilist,
Range noData,
javax.media.jai.ROI mask,
boolean useROIAccessor,
int[] bands,
Statistics.StatsType[] stats,
double[] minBound,
double[] maxBound,
int[] numBins,
List<Range> rangeData,
boolean localStats,
RenderingHints hints)
Performs statistical operations on different image zones defined by the input geometry list.
|
static javax.media.jai.RenderedOp |
create(RenderedImage source,
RenderedImage classifier,
AffineTransform transform,
List<javax.media.jai.ROI> roilist,
Range noData,
javax.media.jai.ROI mask,
boolean useROIAccessor,
int[] bands,
Statistics.StatsType[] stats,
List<Range> rangeData,
boolean localStats,
RenderingHints hints)
Performs statistical operations on different image zones defined by the input geometry list.
|
arePropertiesSupported, getDefaultSourceClass, getDestClass, getDestClass, getInvalidRegion, getName, getNumParameters, getNumSources, getParamClasses, getParamDefaults, getParamDefaultValue, getParameterListDescriptor, getParamMaxValue, getParamMinValue, getParamNames, getPropertyGenerators, getPropertyGenerators, getRenderableDestClass, getRenderableSourceClasses, getResourceBundle, getResources, getSourceClasses, getSourceClasses, getSourceNames, getSupportedModes, isImmediate, isModeSupported, isRenderableSupported, isRenderedSupported, makeDefaultSourceClassList, validateArguments, validateArguments, validateParameters, validateParameters, validateRenderableArguments, validateRenderableSources, validateSources, validateSources
public static final String ZS_PROPERTY
public static javax.media.jai.RenderedOp create(RenderedImage source, RenderedImage classifier, AffineTransform transform, List<javax.media.jai.ROI> roilist, Range noData, javax.media.jai.ROI mask, boolean useROIAccessor, int[] bands, Statistics.StatsType[] stats, double[] minBound, double[] maxBound, int[] numBins, List<Range> rangeData, boolean localStats, RenderingHints hints)
Creates a ParameterBlockJAI
from all supplied arguments except hints
and invokes
JAI.create(String,ParameterBlock,RenderingHints)
.
source
- RenderedImage
source image.classifier
- RenderedImage
optional classifier image(Integral dataType).transform
- affine transformation used for mapping source image on the classifier.roilist
- list of all the geometries.NoData
- No Data range used for calculation.mask
- optional mask for reducing the computations on a selected ROI.useROIAccessor
- boolean indicating if a ROI RasterAccessor should be used during computations with the mask.bands
- Array indicating which band to consider.stats
- Array indicating which statistics to consider.minBound
- Array indicating minimum bounds for complex computations.maxBound
- Array indicating maximum bounds for complex computations.numBins
- Array indicating the number of bins for complex computations.rangeData
- List of the possible range to calculate the statistics.localStats
- Boolean indicating if the statistics must be stored for each range.hints
- The RenderingHints
to use.RenderedOp
source image.IllegalArgumentException
- if source
is null
.JAI
,
ParameterBlockJAI
,
RenderedOp
public static javax.media.jai.RenderedOp create(RenderedImage source, RenderedImage classifier, AffineTransform transform, List<javax.media.jai.ROI> roilist, Range noData, javax.media.jai.ROI mask, boolean useROIAccessor, int[] bands, Statistics.StatsType[] stats, List<Range> rangeData, boolean localStats, RenderingHints hints)
Creates a ParameterBlockJAI
from all supplied arguments except hints
and invokes
JAI.create(String,ParameterBlock,RenderingHints)
.
source
- RenderedImage
source image.classifier
- RenderedImage
optional classifier image(Integral dataType).transform
- affine transformation used for mapping source image on the classifier.roilist
- list of all the geometries.NoData
- No Data range used for calculation.mask
- optional mask for reducing the computations on a selected ROI.useROIAccessor
- boolean indicating if a ROI RasterAccessor should be used during computations with the mask.bands
- Array indicating which band to consider.stats
- Array indicating which statistics to consider.rangeData
- List of the possible range to calculate the statistics.localStats
- Boolean indicating if the statistics must be stored for each range.RenderedOp
source image.IllegalArgumentException
- if source
is null
.JAI
,
ParameterBlockJAI
,
RenderedOp
Copyright © 2006–2017 GeoSolutions. All rights reserved.