ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • 帮助
  • Sign Out
ArcGIS Desktop

ArcGIS Online

专为贵组织打造的制图平台

ArcGIS Desktop

全面的专业性 GIS

ArcGIS Enterprise

面向企业的 GIS

ArcGIS Developers

用于构建位置感知应用程序的工具

ArcGIS Solutions

适用于行业的免费模板地图和应用程序

ArcGIS Marketplace

获取适用于组织的应用程序和数据

  • 文档
  • 支持
Esri
  • 登录
user
  • 我的个人资料
  • 登出

ArcMap

  • 主页
  • 入门
  • 地图
  • 分析
  • 管理数据
  • 工具
  • 扩展模块

指定输入数据

需要 Spatial Analyst 许可。

  • 输入规则

所有地图代数语句都要求其输入使用工具和运算符(只有可选参数的 CreateNormalRaster 和 CreateRandomRaster 除外)。

输入规则

  • 要直接使用输入数据(磁盘、图层、表、字段名称中的数据),必须将其放在加引号的字符串中。
    # The full path and nmae of the dataset is used
    outRas = Slope("C:/Data/elevation")
    
    # If the layer is in the Table of contents or in your workspace then just the quoted name is needed
    outRas2 = Slope("elevation")
    
    # In the following statement Population is a field name
    outRas2 = KernelDensity("inpoints", "Population")
    
  • 可以将现有输入数据分配给变量,并且可在语句中使用该变量。变量不加引号。
    inputElevation = "C:/Data/dem"
    outRas = slope(inputElevation)
    
  • 可将栅格对象用作后续语句的输入。栅格对象是变量,因此不需要加引号。
    outSource = ExtractByAttributes("inraster", "Value > 3000")
    
    # The output of ExtractByAttributes is used as input to EucDistance
    outDistance = EucDistance(outSource)
    
  • 同样可将结果对象用作地图代数表达式的输入。
    # Buffer returns a Result object, which is used here as 
    #   input to EucDistance
    dist = EucDistance(arcpy.Select_analysis("schools", "#", "Pop>2000"))
    
  • 很多工具接受一个参数有多个输入(多值输入)。输入之间以逗号分隔并用方括号括起(表示 Python 列表)。
    outStats = CellStatistics(["inraster1", "inraster2", "inraster3"], "MEAN")
    

相关主题

  • An overview of the rules for Map Algebra

ArcGIS Desktop

  • 主页
  • 文档
  • 支持

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

关于 Esri

  • 关于我们
  • 招贤纳士
  • Esri 博客
  • 用户大会
  • 开发者峰会
Esri
分享您的想法。
Copyright © 2021 Esri. | 隐私政策 | 法律声明