I need to create a fishnet grid (presence and absences) form species distribution areas (polygon shapes). But I need to define that presence (value 1) is correct when more than 30% of the grid is covered by the species distribution area. Any ideas of how to do this?

  • 1
    What software are you attempting to do this in? – Jacob F Sep 7 '17 at 16:35
  • I´m sorry, I´m working with Qgis. – Agustina Novillo Sep 7 '17 at 16:59
  • Create a vector grid with required settings(extent, spacing) and choose output type as polygon

vector > research tools > vector grid

enter image description here

  • perform an intersection with the species distribution layer.

vector > geoprocessing tools > intersection

  • Calculate the area of each polygon of the newly generated layer.

enter image description here

  • join a area attribute to grid layer

enter image description here

  • create the presence /absence field using field calculator and generate values using if condition after determining the area of 30% coverage and replace 30 with that area.

    if( "intersection_area" > 30, 1, 0 )

enter image description here

  1. First make sure your fishnet layer has a unique ID field, we'll assume it's called Id.
  2. I would assume that each feature in your fishnet layer has the same area, but just in case calculate the area for each feature in a new field called AREA.
  3. Run the Intersection tool under the Vector -> Geoprocessing Tools menu. Choose your fishnet layer for the input layer and your species distribution layer for the intersect layer.
  4. Open the attribute table for the new intersected layer and then open the field calculator. Make sure Create a new field is selected and give it the name PROPORTION. Set the Output field type to Decimal number (real). For the expression use $area / "AREA"
  5. Right-click on the original fishnet layer in the Layers Panel and choose properties, then go to the Joins panel. Add a new join, select the intersection layer as the join layer, the join field should be Id, and the target field should be Id. You can toggle the Choose which fields are joined box and select the PROP field.
  6. With the join complete open the attribute table for the fishnet layer. Open the Select by expression tool and use the expression "Intersection_PROP" >= 0.3. This should select all the features in your fishnet where at least 30% of the feature is covered by the species distribution polygon.
  7. You can then use the field calculator to set the value of your presence/absence field to 1 for the selected features.

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.