0

I have a polygon of the distribution of a whale and a polygon of the North Atlantic. Both as Spatial. But now I would like to know the percentage of the area where both polygons overlap (see picture). Do you have an idea how I can achieve this? My attempts with raster::intersect and gIntersection have unfortunately failed, because as a beginner I still have no understanding of what I should do. Thank you in advance!

Polygons Data

Nordatlantik = st_read('Daten/Nordatlantik.kml')

Nordatlantik_n <- st_zm(Nordatlantik[1], drop=T, what='ZM')
as.data.frame(Nordatlantik_n) -> Nordatlantik.df
as(Nordatlantik_n, "Spatial") -> polygon.Nordatlantik

plot(polygon.Nordatlantik)

Shp_Minke_whale = st_read('Daten/Minky_Whale/data_0.shp')
Minke_whale_spatial = as(Shp_Minke_whale, 'Spatial')

plot(Minke_whale_spatial)
plot(polygon.Nordatlantik,
     add=TRUE)

gIntersection(Minke_whale_spatial,polygon.Nordatlantik)
raster::area(Minke_whale_spatial)
raster::area(polygon.Nordatlantik)
raster::intersect(Minke_whale_spatial,polygon.Nordatlantik)

Picture

  • 1
    A couple of suggestions [first](https://stackoverflow.com/questions/70009412/how-to-compute-all-pairwise-interaction-between-polygons-and-the-the-percentage), [second](https://gis.stackexchange.com/questions/362466/calculate-percentage-overlap-of-2-sets-of-polygons-in-r), and you'll want to list your `library(sf)`, and perhaps links to data, if possible. – Chris Sep 15 '22 at 17:43
  • I have provided the polygons (see above) – RechercheKing Sep 15 '22 at 18:04
  • Maybe an idea: You could use the polygon "polygon.NorthAtlantic", cut out the area and then see how big the new "Minke_whale_spatial" is. I only need numbers of the sizes of the polygons and how much of the polygon "Minke_whale_spatial" is in the "polygon.NorthAtlantic". The percentages can be calculated afterwards. I hope it is understandable what I mean. :) – RechercheKing Sep 15 '22 at 18:12

0 Answers0