Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have a polygon grid overlaying several other polygon vectors. I wish to visit each polygon in the grid and ask yes/no if each of these layers fall within the grid cell or not. I can do this easily with a spatial query to select the appropriate cells, but I want to have this information returned as a new attribute column, where each of the grid cells has a yes/no (or 1/0) value accordingly. This seems simple but I cannot figure out how to do it.

Thank you very much for any guidance

share|improve this question
    
Hi darkness, welcome to GIS.se :) I see you've tagged this for 'qgis'; it's also a good idea to include that in the title or body somewhere. I know it seems like duplication but people have a tendency to not read closely the first time through (or ever). You'll get less off-target answers that way. –  matt wilkie May 31 '13 at 21:02

1 Answer 1

This is indeed very simple:

  • Do a spatial query (with the QGIS spatial query tool) and select the intersecting features
  • Open the attributetable of your polygon-layer, toggle edit mode and open the Field Calculator
  • Create a new field updating only the selected features. See image below. All non intersecting features will now have NULL as default value (which you of course also can modify afterwards). Intersecting features will have the value 1 enter image description here
share|improve this answer
    
Fantastic! Thank you so much. –  darkness May 31 '13 at 21:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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