arcgis python get raster extent and set envs.extent (环境设置中的范围)
在Arcgis python函数操作前想要设置范围可以通过arcpy.envs.extent实现,对于栅格来说,获取范围的方法是定义栅格变量,获取其范围。
import arcpy
elevRaster = arcpy.sa.Raster('C:/data/elevation')
myExtent = elevRaster.extent
print myExtent
arcpy.envs.extent = myExtent
# some other action
refs:
https://gis.stackexchange.com/questions/41680/how-to-get-an-extent-for-raster-using-python
转载自:https://blog.csdn.net/dou3516/article/details/82959596