CalcRange | R Documentation |
Calculate range polygons based on convex hulls from occurrence points. Includes planar and a ‘pseudospherical’ method for lat/long geographic coordinates and can crop to terrestrial area.
CalcRange(x, method = "pseudospherical", terrestrial = F,
rare = "buffer", buffer.width = 10000)
x |
a |
method |
character string. The method to calculate convex hull. One of ‘euclidean’ and ‘pseudospherical’. See details. |
terrestrial |
logical. If TRUE the polygons are restriceted to terrestrial area as in |
rare |
character string. Details how to deal with species with less <3 occurrence records. One of ‘buffer’ or ‘drop’. If buffer a geographic buffer with width |
buffer.width |
numeric. The size of the buffer for |
Be careful with polygons when using lat/long data, convex hulls on a sphere are not easily defined. The function is limited to occurrence records on one hemisphere, spanning less than 180 degrees longitude and not crossing the 180/0 boundary!
If method == 'euclidean'
, planar (projected, or local scale) coordinates are expected. If method == 'pseudospherical'
the geosphere::makePoly
is used to define the convex hull. In the latter case, to create the polygon intermediate points are added on a sphere between two coordinates.
An object of the class SpatialPolygonsDataFrame.
See https://github.com/azizka/speciesgeocodeR/wiki for more details and tutorials.
occ.exmpl<- data.frame(species = sample(letters, size = 250, replace = TRUE),
decimallongitude = runif(n = 250, min = 42, max = 51),
decimallatitude = runif(n = 250, min = -26, max = -11))
CalcRange(occ.exmpl, method = "pseudospherical", terrestrial = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.