4

I am working in QGIS 3.16.14 with a dataset that has many overlapping polygons representing fires that occurred in different years (all in one shapefile). I would like to clip the polygons such that there is a single layer (no overlap) and the remaining polygons represent the most recent fire at any location.

For instance, say there are three partially overlapping polygons (fires in 1980, 1992 and 2010; see image), I want that area clipped so only the section of the 2010 polygon remains where it overlaps with the 1992 and 1980 polygons. Any parts of the 1980 polygon under the visible 1992 polygon should be removed too. Any non-overlapping areas should be retained as-is. For the final result, if any year was turned off, it should be blank underneath.

enter image description here

Similar questions have been asked before, but the approach in the comment here did not work for me. 'Delete duplicate geometries' is not deleting all overlaps. An ArcGIS solution was provided here but I don't have access to Arc.

I have done a lot of searching and experimentation, but haven't come up with the desired result.

How do I do this in QGIS?

2 Answers 2

6
  1. Union the layer with itself as input layer, no overlay layer. Duplicate geometries will be created where the polygons overlap.

  2. Aggregate to drop duplicate geometries and keep the one with maximum year: enter image description here

  3. Then dissolve by year

enter image description here

1
  • can you clarify the settings in the Model-builder please? I use a 'datum' field of type 'Datum' aggregate on Maximum to get the polygon with most recent date. Is that correct? On the Dissolve field: It is not clear to me what settings I have to use to get the 'dissolve field: year' (Datum in my case). Aug 30 at 13:56
3

Option 1:

To modify the topology, you need to use GRASS -> v.clean from Processing toolbox -> GRASS -> Vector -> v.clean, and in the cleaning tool use Break, as you can see below:

enter image description here

After cleaning the polygon, you may need to delete the duplicate geometries. It can be done using the tool Delete duplicate geometries from QGIS Processing Toolbox -> QGIS -> Vector general tools -> Delete duplicate geometries

You may need to re-enter the values in the attribute table after cleaning your polygon shapefile.

Option 2:

Another approach is to use Select by Expression (attribute) to select every year and save it as a separate shapefile, then use the Union tool to combine them again. The Union tool will clean the polygons and preserve the information in the attribute table.

Option 3:

Using Select by Expression (attribute) to select every year and save it as a separate shapefile, then use the Difference tool to remove the previous year's polygons using the newer year's polygons then merge them again using the Merge tool, and so on. It is less efficient compared to the Union tool but can do the job.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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