创建输出

需要 Spatial Analyst 许可。

所有地图代数工具和运算符都会生成输出。 对于大多数地图代数工具和运算符来说,栅格对象就是等号左侧的输出。

输出规则

  • 可生成栅格的运算符或工具会返回栅格对象。 在这种情况下,Raster 对象指向临时栅格数据集。
    outSlope = Slope("indem")
  • 基于一个语句创建的输出栅格对象可以直接用于后续语句中。
    outDirection = FlowDirection("inelevation")
    outAccumulation = FlowAccumulation(outDirection)
  • 生成的栅格对象所引用的栅格数据集是临时数据集,ArcGIS 会话结束时会将其从磁盘上移除。 可通过对栅格对象调用 save 方法来永久保存引用的栅格数据集。
    outSlope = Slope("indem")
    outSlope.save("sloperaster")
    有关如何永久保存栅格对象所引用的数据集的更多示例,请参阅栅格对象的交互

    有关栅格对象及其属性和方法的详细信息,请参阅使用栅格对象

  • 如果一个工具可以创建多个输出,则可将可选输出表示为工具参数,并加上括号放在等号右侧。 可选栅格输出是磁盘上的永久数据集,而不是栅格对象。
    
    # An empty string, "", indicates the use of a default value for the parameter.
    # In the following statement the defaults are taken for maximum_distance and 
    # cell_size parameters. outdirection will be a a permanent raster stored in the 
    # current workspace.
    outDistance = EucDistance("input", "", "", "outdirection")
  • ArcGIS Spatial Analyst 扩展模块 中有几个不输出栅格的工具,如等值线。 这些工具将输出表示为工具定义中的一个参数,并用括号括起来。
    Contour("elevation", "C:/sapyexamples/output/outcontours.shp", 200, 0)

相关主题


在本主题中
  1. 输出规则