[R-sig-Geo] gIntersection for several polygons

Rebecka rehe0001 at stud.slu.se
Tue Nov 11 10:09:18 CET 2014


Hi!

I´m a beginner with R and I´m trying to calculate area of polygons
(homerange areas of 31 individuals) intersecting with bufferzones around
4348 number of windfarms. I have read this webpage as a help:
http://rstudio-pubs-static.s3.amazonaws.com/7993_6b081819ba184047802a508a7f3187cb.html

I´ve succeeded to create bufferzones with gBuffer. Now I would like to do
gIntersection for every individuals homerange overlap with bufferzones. I´ve
tried to create homeranges as a first step using gConvexHull but I don´t
understand how to this by each id for every individual. I have a
spatialpointsdataframe with one column called "Object_ID" and also columns
"x" and "y" for coordinates and every row corresponds to one position. Every
individual have a lot of coordinates (all individuals have over 94000
positions together).

Is it possible to create one homerange for every individual using
gConvexHull? byid=TRUE just do it for every row when I tried.

I also tried to go around the problem creating mcp (packageadehabitatHR) for
every individual. 
mcpAll<-mcp(animalSpdf[,2]) *gives Spatialpolygons*

Then I tried to use that in gIntersection
inter1<-gIntersection(mcpAll,Prop1,byid=TRUE) *Prop1 is my windfarms with
bufferzones*
but it only gave a NULL result for inter1. CRS are same for both and I know
that they should overlap. 

Any ideas how to solve this?

Thanks!!

Rebecka Hedfors




--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/gIntersection-for-several-polygons-tp7587418.html
Sent from the R-sig-geo mailing list archive at Nabble.com.



More information about the R-sig-Geo mailing list