arcgispython实现批量化裁剪影像.docxVIP

  • 22
  • 0
  • 约小于1千字
  • 约 2页
  • 2021-01-08 发布于天津
  • 举报
ArcGIS Pyth on 实现批量化裁剪影像 一、 程序代码: import arcpy arcpy.CheckOutExte nsion (spatial) arcpy.gp.overwriteOutput=1 arcpy.e nv.workspace = F:\\Modis_16\\1Moasic rasters = arcpy.ListRasters(*, tif) mask= F:\Wegetati on Chan ge\\Data\\B oun d\\bo un d_Buffer_Polygo n. shp for raster in rasters: prin t(raster) out= F:\Wegetation Cha nge\\Data\\GIMMS Data\\ new\\+ma_+raster[0:8] arcpy.gp.ExtractByMask_sa(raster, mask, out) prin t(ma_+raster[0:8]+ has don e) prin t(All don e) 二、 注意事项: arcpy.gp.overwriteOutput=1 即覆盖之前的文件; 输入的是.tif 文件,输出的是Grid文件; raster[0:8] 表示从第0个开始取8个字符串; bou nd_Buffer_Plygo n. shp 后缀名不可或缺。 三、 运行情况:

文档评论(0)

1亿VIP精品文档

相关文档