• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录

gisoracle

  • 博客园
  • 联系
  • 订阅
  • 管理

公告

View Post

Get Raster Properties获得栅格的信息

Summary

Returns the properties of a raster dataset.

Usage

  • The property returned will be displayed in the geoprocessing window.

Syntax

GetRasterProperties_management (in_raster, {property_type})
Parameter Explanation Data Type
in_raster

The input raster dataset.

Raster Layer
property_type
(Optional)

The property to be obtained from the raster dataset.

    <esri_enumhead><esri_enumvaluehd><esri_enumdeschd>
  • MINIMUM —Returns the smallest value of all cells in the input raster.
  • MAXIMUM —Returns the largest value of all cells in the input raster.
  • MEAN —Returns the average of all cells in the input raster.
  • STD —Returns the standard deviation of all cells in the input raster.
  • UNIQUEVALUECOUNT —Returns the number of unique values in the input raster.
  • TOP —Returns the top or YMax value of the extent.
  • LEFT —Returns the left or XMin value of the extent.
  • RIGHT —Returns the right or XMax value of the extent.
  • BOTTOM —Returns the bottom or YMin value of the extent.
  • CELLSIZEX —Returns the cell size in the x-direction.
  • CELLSIZEY —Returns the cell size in the y-direction.
  • VALUETYPE —Returns the type of the cell value in the input raster:
    • 0 = 1-bit
    • 1 = 2-bit
    • 2 = 4-bit
    • 3 = 8-bit unsigned integer
    • 4 = 8-bit signed integer
    • 5 = 16-bit unsigned integer
    • 6 = 16-bit signed integer
    • 7 = 32-bit unsigned integer
    • 8 = 32-bit signed integer
    • 9 = 32-bit floating point
    • 10 = 64-bit double precision
    • 11 = 8-bit complex
    • 12 = 64-bit complex
    • 13 = 16-bit complex
    • 14 = 32-bit complex
  • COLUMNCOUNT —Returns the number of columns in the input raster.
  • ROWCOUNT —Returns the number of rows in the input raster.
  • BANDCOUNT —Returns the number of bands in the input raster.
String

Code Sample

GetRasterProperties example 1 (Python window)

This is a Python sample for GetRasterProperties

import arcpy
from arcpy import env
env.workspace = "c:/data"
#Get the geoprocessing result object
elevSTDResult = arcpy.GetRasterProperties_management("elevation", "STD")

#Get the elevation standard deviation value from geoprocessing result object
elevSTD = elevSTDResult.GetOutput(0)
GetRasterProperties example 2 (stand-alone script)

This is a Python script sample for GetRasterProperties

import arcpy
from arcpy import env
env.workspace = "c:/data"
#Get the geoprocessing result object
elevSTDResult = arcpy.GetRasterProperties_management("elevation", "STD")

#Get the elevation standard deviation value from geoprocessing result object
elevSTD = elevSTDResult.GetOutput(0)

posted on 2019-07-11 09:41  gisai  阅读(652)  评论(0)    收藏  举报

刷新页面返回顶部
 
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3