I know there already are posts about this subject, I tried to derive a solution for my own problem but the code for field mapping is very complex to me.
I have a Raster 100x100m and point layers that I want to join using a python script. I need the SUM of a field called "weight" (point layer) added to the grid, but I don't know how to define the field mapping.
So far the script looks like this (but doesn't sum up my weight field):
import arcpyfrom arcpy import envenv.workspace = r"C:\Users\Daniela\Desktop\test"fc_list = arcpy.ListFeatureClasses()for fc in fc_list: arcpy.SpatialJoin_analysis("grid100.shp",fc,"C:/Users/Daniela/Desktop/test/test" + "_" + str(fc),"JOIN_ONE_TO_ONE","KEEP_ALL","sum","INTERSECT","","")Thank you!
أكثر...
I have a Raster 100x100m and point layers that I want to join using a python script. I need the SUM of a field called "weight" (point layer) added to the grid, but I don't know how to define the field mapping.
So far the script looks like this (but doesn't sum up my weight field):
import arcpyfrom arcpy import envenv.workspace = r"C:\Users\Daniela\Desktop\test"fc_list = arcpy.ListFeatureClasses()for fc in fc_list: arcpy.SpatialJoin_analysis("grid100.shp",fc,"C:/Users/Daniela/Desktop/test/test" + "_" + str(fc),"JOIN_ONE_TO_ONE","KEEP_ALL","sum","INTERSECT","","")Thank you!
أكثر...