getProjString
generates a projection string in the proj4 format.
projectMatrixList
projects a list of matrices.
spatial2matrixList
converts a Spatial object to a list of matrices.
matrixList2multipolygon
converts a list of matrices to a multipolygon wkt string.
multipolygon2spatial
converts a multipolygon wkt string to a Spatial object.
isSpatial
determines whether the input is of Spatial class.
isMatrixList
determines whether the input is a list of matrices or data frames.
isMultipolygon
determines whether the input is a multipolygon wkt (well known text) string.
matrixListLevel
determines the number of levels in a list of matrices, where 1 denotes a matrix, 2 denotes a list of matrices, and 3 denotes a list of lists of matrices.
rapplyKeepDataFrames
lapplies the funciton FUN
throughout the first two levels of a list but not into any data frames.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | getProjString(par = list(proj = "laea", units = "kmi", lon_0 = NA, lat_0
= NA, x_0 = 0, y_0 = 0, ellps = "WGS84", datum = "WGS84"), ...,
x = NULL, list.out = FALSE, requireClosed = TRUE)
projectMatrixList(x, par = list(proj = "laea", units = "kmi", lon_0 = NA,
lat_0 = NA, x_0 = 0, y_0 = 0, ellps = "WGS84", datum = "WGS84"),
inv = FALSE, data.frame.out = FALSE)
spatial2matrixList(x, drop = TRUE, data.frame.out = FALSE)
matrixList2multipolygon(x, requireClosed = TRUE)
multipolygon2spatial(x)
isSpatial(x)
isMatrixList(x)
isMultipolygon(x)
matrixListLevel(x)
rapplyKeepDataFrames(x, FUN, ...)
|
par |
A list of proj4 parameters. |
... |
Further proj4 parameters overriding those in |
x |
One of three onjects depending on the funciton: (1) a two column matrix of x and y coordinates, indicating only one polygon, or a list (of lists) of such matrices, indicating several polygons in a multipolygon. If a list of lists of two column matrices are given, the first matrix of each list is the polygon, and the following are subtractions. (2) A wkt string such as "MULTIPOLYGON(((4 55, 15 56, 15 59, 4 59, 4 55)))". (3) A spatial object. |
list.out |
Logical: If TRUE the projection info is returned as a list instead of a concatenate string. |
requireClosed |
Logical: If TRUE (default) require polygons to be closed in the sense that the last point should equal the first. Set this to FALSE to allow adding the first point as the last point. |
inv |
Logical: If TRUE, do the inverse conversion in rgdal::project(). |
data.frame.out |
Logical: If TRUE convert the matrices to data frames with columns x and y. |
drop |
Logical: If TRUE drop the list if only one multipolygon or only one polygon is given. |
FUN |
The funciton to apply to the elements in |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.