1

I am using QGIS. I would like to know the number of 10x10 grids that intersect with each polygon of my layer.

  1. Layer 1: This layer contains a list of species. Species A, Species B, etc. Each species has its own polygon or multiple polygons within the layer depicting its geographic distribution across the globe.

  2. Layer 2: I have a second layer, a grid of 10x10 cells that I created using: Vector-> Research Tools-> Vector Grid.

I want to know the number of grids (Layer 2) that intersects with each species polygon(s) (Layer 1). I know that if Layer 1 had only one species, then I could use Vector->Data Management Tootls-> Join Attributes By Location.

However, I do not know how to loop through Layer 1 so that it does this for each species.

This link seems to be asking for something similar, but the solution uses ArcGIS, and I am using QGIS.

1

You can do this (as you guessed) by using Join Attributes By Location.

For the Target vector layer select your species layer, and for Join vector layer select your grid layer. For Attribute Summary select Take summary of intersecting features and check Sum.

After you run that operation, the resulting file will include a field COUNT for each feature that will be the number of grid cells that polygon intersects.

  • Great answer. If I want to know WHICH grids intersect each polygon (not just the count), how do I do that? – Andy Jun 3 '15 at 16:08

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.