Python实现PointToRaster

参数说明:

(1)file:点图层(.shp)

(2)data:值字段

(3)outFile:转换后的栅格图层

(4)9660.848118:空间分辨率

import arcpy
arcpy.gp.overwriteOutput=1
arcpy.env.workspace="G:\\Phenology of 30 Years\\GIMMS 3g\\14Down\\1PointsJoin\\"
outPath="G:\\Phenology of 30 Years\\GIMMS 3g\\14Down\\2PointToRaster\\"
files=arcpy.ListFeatureClasses()
for file in files:
    outFile=outPath+"p2r_"+str(file[5:9])
    arcpy.PointToRaster_conversion(file, "data", outFile, "MOST_FREQUENT", "NONE", "9660.848118")
    print(file[5:9]+" has done!")
print("All done,please!")


你可能感兴趣的:(Python实现PointToRaster)