0

I seek advice for calculating presence/absence of features in QGIS. I have a polygon dataset of boundary outlines and a number of other datasets which I want to compare it against for presence/absence of features within the main boundary dataset.

Can I do this using the vector datasets as is or will I need to convert then to a grid/raster beforehand?

My example is I have OS administrative boundaries an OS open green spaces data, I would like to know whether an area of open green space is present or absent from each boundary polygon. I was thinking about using the Join attributes by location and intersect, but don't know if that is flexible enough to give a simple yes/no answer for each boundary polygon.

1

One method:

Install the refFunctions plugin.

Use field calculator to add a field with the expression

intersecting_geom_count('layer name') > 0

If you need a live-updating count, make it a virtual field by selecting "Create virtual field." Otherwise make it a static field by leaving that box un-checked.


Another method:

Join attributes by location. Vector menu > Data management tools > Join attributes by location

  • For Geometry Predicate, choose "intersects"
  • For Fields to add, choose one field - any field will work as long as it has no null values

    Then use the field calculator to create a field with this expression:

    'field name' is not null

If you need a live-updating count, make it a virtual field by selecting "Create virtual field." Otherwise make it a static field by leaving that box un-checked.

  • Hi thanks for this, I will try the refFunctions plug in. I'm having a lot of problems with using the join attributes process, I'm not sure if my computer is lacking enough processing power, but it takes forever to do anything and usually crashes before it is finished. Also, one of my tables won't work as it says that a feature has bad geometry, I've tried fixing and cleaning the geometries, but nothing seems to work! – RinaJ Jun 12 '18 at 9:31
  • Post each of those issues as a new question if you want help with them. – csk Jun 13 '18 at 16:13

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.