Select to view content in your preferred language

Model Builder Help w/Geoprocessing

539
1
12-19-2012 10:27 AM
JeffSlauenwhite
New Contributor II
Hi All,

I have a shapefile of municipal boundaries and another of lights.  I want to select, and count the lights within each boundary and then write the result to a file or even simply get count of the number within model builder, to keep it simple.

Anyone have any simple ideas on how can I do this without making a series of select by attribute and then select by location tools?

Furthermore how could I write out the count of these records to a file?
I know there are tools within model builder I'm just not aware of - I'm fairly novice to using it.

Anything you can tell me will help.

Thanks
JS
0 Kudos
1 Reply
DaleHoneycutt
Regular Contributor
Lot's of ways to do this, but the simplest is probably the Spatial Join tool.  The parameter values you supply to Spatial Join are as follows:

Target Features: your municipal boundary polygons
Join Features: your "lights" feature class - I'm assuming these are point features.  If not, this technique won't work.
Output Feature Class: whatever you want.  This will be a polygon feature class.
Join Operation: JOIN_ONE_TO_ONE
Field Map: (no change, leave as is)
Match Option: INTERSECT

The output feature class will have a Join_Count field which is the number of points that fall w/in the polygon
0 Kudos