Please help me with this question about "Select by Location". I'm currently using ArcGis 9.3.1

I have multiple "Selector" polygons. Ideally, I would like to select a points shapefile with "Select by Location" using the selector polygon. Then I create a column in the attribute table and put a value of "1" in only the rows that are selected.

So the process is farily straightforward, except that I have about 30 selector polygons, so it's hard to repeat the process of select by location, create column, tag the rows that are selected, over and over.

I've tried to think of a few ways of doing this, but they don't seem to accomplish exactly what I might need. I could try a model in Modelbuilder, but my polygons are constantly changing, and I'm not sure of a way for Modelbuilder to grab all the latest polygons. Other way I thought was merging all the selector polygons into one shapefile, then maybe doing a spatial join? However I accomplish this, I really need separate columns for each selector polygon in the table, so the points file can show any overlapping polygons.

  • Do these selector polygons overlap each other? If not, then your idea of merging the polygons could work. In that case, however, I would use Intersect rather than Spatial join.
    – Baltok
    Nov 29, 2012 at 15:27
  • Timestamp your polygons - if using a database (like oracle spatial) then you can use MAX DATE docs.oracle.com/javadb/
    – Mapperz
    Nov 29, 2012 at 15:29
  • Baltok, the polygons do overlap each other. I'm trying to think of the Intersection tool, and I'm not sure if that will work with polygon to points, will it?
    – Tx_Dan
    Nov 29, 2012 at 16:18
  • 1
    Intersect works with points, lines, and polygons. The output is limited to the simplest input (I.e., if you put in polygons and points, the output will be points. The problem you may run into is if a point is overlapped by multiple polygons. Not sure how Intersect will treat that.
    – Baltok
    Nov 29, 2012 at 16:51
  • 1
    Baltok, thanks for looking. You understand exactly what I'm trying to do. I just tried the intersect like you mentioned and it indeed makes 3 points in the output. So now I need to merge the three new points to make one and merge all the fields somehow..So for the Fields: Poly A Column = "Y", Poly B Column = NULL, Poly C Colyumn "Y" are all on one row. That way I can join it back to the original point file. I think you took care of the hard part though. Thanks!
    – Tx_Dan
    Nov 29, 2012 at 17:42

2 Answers 2


If you can't be productive enough by manually using your "selector" polygon (and calculating the selected rows of points to "1" in your new attribute fields) and Modelbuilder isn't flexible enough to meet your needs, then Python Arcgisscripting for (9.3) could definitely meet your goals. It depends on how long the manual repetitious method would take verses how long it would take to code using Esri's Arcgisscripting module for ArcGis Desktop 9.3.1.

If you're up to the challenge you might want to check out some of the ArcGis / Python forums for advice specifically with the Arcgisscripting Python Module.

Otherwise, it's likely someone with more Python experience than myself could give you a quick script (or invaluable hints). Good luck


Baltok is indeed correct in suggesting the Intersect tool - the output from your points and a Merge of your selector polygons will give you points with the ID attributes of both points and polygons (make sure both your attribute tables contain unique identifiers). The final steps are to Add Field and Calculate Field of type integer with all values of 1, and then Pivot Table using the point ID as the Input Field, polygon ID as the Value Field, and the newly added/calculated field of 1's as the Value Field. If you don't have an ArcInfo license, the pivot table can be done in Excel or similar.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.