Skip to content

Calculating what proportion of polygons is covered by rivers

1 message · Robert J. Hijmans

#
Juta,
I think you can do something along these lines:

library(raster)
library(rgeos)

x <- union(districts, rivers)
a <- gArea(x, byid=TRUE)
head(x)
head(a)

or
x <- intersect(districts, rivers)

and compare to 'districts'

Robert


On Sun, Nov 30, 2014 at 2:59 PM, Juta Kawalerowicz
<juta.kawalerowicz at nuffield.ox.ac.uk> wrote: