I have three different polygon layers with some polygons that overlap. I have points that fall both inside and outside of these polygons. I want to assign a value of 1 if a point falls inside any polygon and a value of 0 if a point is not inside any polygon. How to do this?

  • Have you considered a spatial join? resources.arcgis.com/en/help/main/10.2/index.html#//… but first merge resources.arcgis.com/en/help/main/10.2/index.html#//… the three layers as you're only concerned with any polygon of the 3 layers then the spatial joined points will either have an ID of an intersecting polygon or -1 for not falling inside a polygon, from here you can do a select by attributes on the spatial join with other ID = -1, populate (calculate field) with 0 then switch selection and populate with 1. May 30 '19 at 1:38
  • If you don't want to create an output feature class you can use select layer by location resources.arcgis.com/en/help/main/10.2/index.html#//… (new selection first then add to selection for subsequent) and use the attribute table field calculator to populate the field with 1 (intersects any polygon) then switch select and populate the field with 0 (misses all polygons). May 30 '19 at 1:41
  • Thank you Michael - the second option worked well. For others that might have similar issue, note that I could only select features (that intersected) from one source layer at a time and used field calculator to populate those selected fields in attribute table, then moved on to the next source layer and repopulated fields and etc.
    – user143855
    May 30 '19 at 5:34
  • The first layer the selection option is create new selection, for 2nd and subsequent selecting layers change to add to current selection and choose the next selection layer, this will ensure that all the features that intersect any polygon are selected. Performing the select by location one at a time could be futile unless you exclude the features with the field set to 1 from the layer (definition query for this) otherwise at the end when you switch selection you will be overwriting the previous calculations. If you have a working method please answer your own question for future users. May 30 '19 at 5:57
  • Use near tool, you can set multiple layers as input. Check the table of points after.
    – FelixIP
    May 30 '19 at 6:49

The following is one workflow that will produce a binary output based on point proximity to polygons.

  1. Merge
  2. Dissolve
  3. Spatial Join

enter image description here

enter image description here

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.