Join data from another layer based on spatial location in modelbuilder

3463
2
08-30-2011 06:16 AM
JasonAbkowitz
New Contributor
I have two shapefiles, one a set of rail links and the other a set of population points. I have been able to associate the population points belonging to each rail link in modelbuilder. My problem is that I can???t find a way in modelbuilder to sum the population associated with each point into a single value and assign it to the link record.  The spatial join tool in modelbuilder doesn???t allow one to summarize attributes like it does when you right click on the shapefile and hit join based on another layer???s spatial location. Any suggestions on how to accomplish this?
0 Kudos
2 Replies
NobbirAhmed
Esri Regular Contributor
If you are using Spatial Join in ModelBuilder then after you connect necessary ovals to the tool, double-click the Spatial Join tool to open its dialog. Then, go down to the Field Map control - it lists all the fields from the target and join feature classes. Find the field of the Join Features (points in your case), right-click on the field name, move your cursor to Merge Rule and select Sum from this context menu. When you run the model now you will see the values from the joined points are summed up in a field of the output. Let me know if you still have any issue.

Nobbir Ahmed
Esri Geoprocessing and Analysis Team
0 Kudos
JasonAbkowitz
New Contributor
It worked! Thank you very much!
0 Kudos