Description Value Methods Author(s) References See Also Examples
Extract vertices from a SpatialPolygonsDataFrame and optionally applies an aggregating function to each Polygon.
A SpatialPointsDataFrame containing an id column corresponding to each extracted Polygon.
Extract Polygon vertices and remove the last (repeated line) of each Polygon.
Mihai Valcu valcu@orn.mpg.de
Valcu, M., Dale, J. and Kempenaers, B. (2012) rangeMapper: A platform for the study of macroecology of life history traits. 21(9). (DOI: 10.1111/j.1466-8238.2011.00739.x)
1 2 3 4 5 6 7 8 9 10 11 | require(rangeMapper)
f = system.file(package = "rangeMapper", "extdata", "wrens", "vector")
# path to Campylorhynchus_gularis breeding range:
camgul = selectShpFiles(f, ogr = TRUE, polygons.only = TRUE)[6, ]
r = readOGR(camgul$dsn, camgul$layer)
mp = vertices(r, mean)
v = vertices(r)
plot(r)
points(mp, col = 2, pch = 3, cex = 2)
points(v, pch = 3, cex = .5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.