Arcpy批量实现矢量转栅格
首先可以手动操作生产一个具有自己想要的投影信息和像元分辨率的参考栅格
然后把环境变量设置为和其保持一致
批量转矢量为栅格
import arcpy arcpy.env.workspace ="E:\\DATA"#具有多个矢量的文件路径 outfolder="E:\\OUT" fcs=arcpy.ListFeatureClasses() for fc in fcs: print(fc) out_rasterdataset=outfolder+"\\"+fc[:-4]+"Albers.tif" arcpy.conversion.PolygonToRaster(fc,"class", out_rasterdataset,"CELL_CENTER", "NONE", "E:\\2000.tif")#标准栅格路径