arcGIS python进行栅格裁剪Clip,要素类裁剪栅格数据。
#-*- coding:UTF-8 -*-
import arcpy
from arcpy import env
env.workspace = r"C:\Users\HP\Desktop\20210323\tweets.gdb"
result_KDE = r"C:\Users\HP\Desktop\20210323\tweets.gdb\result_KDE"
#栅格裁剪Clip Raster
clip_shp = r"C:\Users\HP\Desktop\20210323\tweets.gdb\states_lower48"
clip_KDE = r"C:\Users\HP\Desktop\20210323\tweets.gdb\clip_KDE"
arcpy.Clip_management(result_KDE, "#", clip_KDE, clip_shp, "0", "ClippingGeometry")
print("---output clip KDE Successful-----")