I have two shapefiles of digitized wildfires. Each shapefile has many polygons representing different fires. Each shapefile has an attribute field to denote the year of the fire. One shapefile covers the southern portion of my study area while the other covers the northern portion of my study area. However, where the two meet, there is some overlap in digitized fires. Since the digitization was completed by different people using different methods, the polygons to not line up exactly.
Purple is the southern digitized fire; Beige is the northern digitized fire.
I would like to find the polygons that overlap spatially and have the same "Year" attribute between the two shapefiles and delete the one that is contained in the southern shapefile (the northern shapefile is higher quality). Then I would like to merge the two shapefiles so I have one complete set of fires for my entire study area with no duplicates.
How do I do this using R?
I've been trying to work it out in ArcGIS ModelBuilder but I can't quite figure out how to iterate over the years. I am fairly proficient in R as well and would like to go that route (since the output of this will end up in R at some point anyway).