# -*- coding: utf-8 -*- import arcpy import os # Set environment settings workspace = "D:\\PyCharm\\program\\pythonProject\\sd_and_swe\\1\\SnowClass_GL_01km_30.0arcsec_2021_v01.0.tif" # 待裁剪tif影像存放路径 outputpath = "C:\\Users\\Admin\\Desktop\\2\\test.tif" # 输出结果影像存放路径 inMaskData = "C:\\Users\\Admin\\Desktop\\中国矢量边界_wj\\国界线.shp" # shp文件存放路径及名称 arcpy.gp.ExtractByMask_sa(workspace, inMaskData, outputpath) print('finished!')
arcpy根据shp文件裁剪栅格影像
最新推荐文章于 2024-06-18 16:30:18 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)