[R-sig-Geo] xtracting coordinates of model boundaries

agus agus.camacho at gmail.com
Wed Dec 21 07:35:40 CET 2011


Hello all,

I am trying to calculate the exact area in km2 for a given maxent model of
distribution of a species, at a given probability of occurrence.
 
How could be the best way to do that?

I tried     area (model) but it seems to give me the number of pixels of the
square generated by the maximum values of long/lat.

I also tried to use:
pred_area=length(a at data@values[a at data@values>quantile(a at data@values,c(0.95))])

To find the number of raster cells that have a given probability of finding
the species, and then multiplying it by the resolution. However, I think
this does not correct for the spatial diferences between raster cell sizes
along latitudinal gradients.

Finally, given a set of coordinates x, I think I might use:

coords=x
coordinates(coords) <- ~Longitude+Latitude
projection(coords) <- " +proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0
+no_defs"
r = raster(coords)# avoiding South Pole; bugs there.
p = rasterToPolygons(r)# or a sp coerce method from the spgdf
dist.extent=(areaPolygon(p)/10^6)# area in km2

to calculate the extent of distribution. 

However, help tells that polygons should not self intersect for
areaPolygon() to work well. Then, how to avoid intersecting polygons from a
maxent model or just a set of occurences?

In other words:
How to extract coordinates of the boundaries of a distributional model, at a
given probability of occurrence, and then calculate the area?

Any hint/paper/package documentation you could recommend would be welcome.


Thanks a lot!
Agus


--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/xtracting-coordinates-of-model-boundaries-tp7114268p7114268.html
Sent from the R-sig-geo mailing list archive at Nabble.com.



More information about the R-sig-Geo mailing list