Statistics

摘要

基于已定义的焦点邻域计算影像中各像元的统计数据。

说明

有关此函数使用方法和波段顺序的详细信息,请参阅统计数据栅格函数。

栅格对象所引用的栅格数据集是临时性的。 要将其设置为永久,可以调用栅格对象的 save 方法。

语法

Statistics (raster, kernel_columns, kernel_rows, stat_type, {fill_no_data_only})
参数说明数据类型
raster

The input raster on which to perform focal statistics.

Raster
kernel_columns

The number of pixel columns to use in your focal neighborhood dimension.

(默认值为 3)

Integer
kernel_rows

The number of pixel rows to use in your focal neighborhood dimension.

(默认值为 3)

Integer
stat_type

Specify the type of statistics to calculate.

  • max Calculates the maximum value of the pixels within the neighborhood.
  • mean Calculates the average value of the pixels within the neighborhood. This is the default.
  • min Calculates the minimum value of the pixels within the neighborhood.
  • standarddeviationCalculates the standard deviation value of the pixels within the neighborhood.
  • medianCalculates the median value of the pixels within the neighborhood.
  • majority Calculates the majority value, or the value that occurs most frequently, of the pixels within the neighborhood.
  • minority Calculates the minority value, or the value that occurs least frequently, of the pixels within the neighborhood.

(默认值为 None)

String
fill_no_data_only

Specify whether NoData values are ignored in the analysis.

  • True—Fills NoData pixels only. This is the default.
  • False—NoData pixels will not be filled.

(默认值为 False)

Boolean
返回值
数据类型说明
Raster

输出栅格。


在本主题中