I have 180 point feature classes with rainfall totals. Each feature class represents one days rainfall for a region and has around 36K points (think of each point as a weather station in the region). Each feature class only has one non-required attribute, "RAINFALL" with the total rainfall for a given day at that weather station. I need to join these features together so that the resulting feature class has a attribute column for each day. Here is my simplistic start to my code:
import arcpy arcpy.env.workspace = r'C:\users\rainfall_data' fcs = arcpy.ListFeatureClasses() print fcs for fc in fcs: desc = arcpy.Describe(fc) shpname = 'r_'+desc.name[:8] print shpname arcpy.AddField_management(fc,shpname,'float',4,2) arcpy.CalculateField_management(fc,shpname,'[RAINFALL]','VB') arcpy.DeleteField_management(fc,["RAINFALL"]) print "Merging..." arcpy.Merge_management(fcs,r'C:\Users\rainfall_data\output.shp') print "Done."
Obviously merging is not getting me the result I want. I get roughly 4 million points and a lot of 0's because it merges every record but I don't know how I can do this with spatial join.
I'm new to arcpy.