Method Overview
Name | Return Type | Summary | |
---|---|---|---|
Promise | Returns an object containing various statistics describing a set of values returned from a field in a FeatureLayer. more details | more details |
Method Details
summaryStatistics(params){Promise}
Returns an object containing various statistics describing a set of values returned from a field in a FeatureLayer.
Parameters:params ObjectSee the table below for details of each parameter.
Specification:layer FeatureLayer | SceneLayerThe layer from which to query attributes for statistics.
optionalfield StringThe name of the numeric field for which the summary statistics will be generated.
optionalnormalizationField StringThe field by which to normalize the values returned from the given
field
.optionalfeatures Graphic[]If the FeatureLayer is constructed with client-side graphics or you would like to calculate statistics based on a subset of features, then pass the features in this parameter.
optionalminValue NumberThe minimum bounding value for the statistics calculation. Use this in conjunction with
maxValue
to generate statistics between lower and upper bounds.optionalmaxValue NumberThe maximum bounding value for the statistics calculation. Use this in conjunction with
minValue
to generate statistics between lower and upper bounds.Returns:Type Description Promise Returns a promise that resolves to SummaryStatisticsResult.
Type Definitions
SummaryStatisticsResult
The statistics returned from the summaryStatistics() query.
Properties:avg NumberThe average of all values returned from the field.
count NumberThe number of features evaluated.
max NumberThe maximum of all values returned from the field.
min NumberThe minimum of all values returned from the field.
stddev NumberThe standard deviation calculated from values returned from the field.
sum NumberThe sum of all values returned from the field.
variance NumberThe calculated variance from all values returned from the field.