StatisticsHistogram
汇总
计算栅格的统计数据和直方图。
讨论
有关此函数工作原理的详细信息,请参阅 统计数据和直方图 栅格函数。
栅格对象所引用的栅格数据集是临时性的。 要将其设置为永久,可以调用栅格对象的 save 方法。
语法
StatisticsHistogram(raster, statistics, histogram)
| 参数 | 说明 | 数据类型 |
|---|---|---|
|
raster |
The input raster. |
Raster |
|
statistics |
List of statistical information, based on predefined statistics for each band. Statistics specified for a single-band raster are, for example: Statistics specified for a three-band raster are, for example: |
List |
|
histogram |
Dictionary of histogram information, based on predefined histogram for each band. Enter the dictionary of histogram information using the example below:
|
Dictionary |
返回值
| 数据类型 | 说明 |
|---|---|
|
Raster |
已定义统计数据和直方图的输出栅格。 |
代码示例
计算栅格的统计数据和直方图。
import arcpy
StatisticsHistogram_raster = arcpy.sa.StatisticsHistogram(imagePath1, [-4.514, 4.338, 0.0043, 1.0], None)