ArcGIS教程:区域合并 (Spatial Analyst)

 时间:2024-10-12 03:28:56

1、摘要 记录输出中每个像元所属的连接区域的标识。每个区域都将被分配给唯一编号。插图

ArcGIS教程:区域合并 (Spatial Analyst)

3、代码实例 RegionGroup示例1(Python窗口) 此示例使用八囿鹣分胰向连接方法为输入栅格的每个区域分配一个唯一编号。import锾攒揉敫arcpyfromarcpyimportenvfromarcpy.saimport*env.workspace ="C:/sapyexamples/data"outRgnGrp = RegionGroup("land","EIGHT","","",5)outRgnGrp.save("c:/sapyexamples/output/reggrp_ex5") RegionGroup示例2(独立脚本) 此示例使用具有排除的值的八向连接方法为输入栅格的每个区域分配一个唯一编号。# Name: RegionGroup_Ex_02.py# Description: Records, for each cell in the output, the# identity of the connected region to which# it belongs within the Analysis window. A# unique number is assigned to each region.# Requirements: Spatial Analyst Extension# Import system modulesimportarcpyfromarcpyimportenvfromarcpy.saimport*# Set environment settingsenv.workspace ="C:/sapyexamples/data"# Set local variablesinRaster ="land"valToIgnore =5# Check out the ArcGIS Spatial Analyst extension licensearcpy.CheckOutExtension("Spatial")# Execute RegionGroupoutRegionGrp = RegionGroup(inRaster,"EIGHT","CROSS","NO_LINK", valToIgnore)# Save the outputoutRegionGrp.save("C:/sapyexamples/output/reggrpout")环境 像元大小,当前工作空间,掩膜,输出坐标系,范围,临时工作空间,捕捉栅格

  • ArcGIS平滑线(二)
  • ArcGIS栅格数据重分类
  • 如何使用arcgis在模型构建器中使用迭代器
  • ARCGIS地图制图教程(四)插入图例和图例编辑
  • arcgis如何一框多图
  • 热门搜索
    旅游摄影 眉山旅游 临时牌照可以上高速 旅游管理论文 武汉市旅游局 高考志愿可以填几个 越南旅游攻略 皖西学院怎么样 atm机可以跨行转账吗 全球最美10个旅游胜地