proj_trans | R Documentation |
Transforms all coordinates in x
using wk::wk_handle()
and proj_trans_create()
.
proj_trans(x, target_crs, source_crs = NULL, ..., use_z = NA, use_m = NA)
x |
Input geometry/geography. May take any of the following forms:
|
source_crs , target_crs |
Source/Target CRS definition, coerced with |
... |
Additional parameters forwarded to |
use_z , use_m |
Used to declare the output type. Use |
Values that are detected out of bounds by library PROJ are allowed, we return Inf
in this case, rather than the error "tolerance condition error".
Transformed geometries whose format is dependent on input.
see the PROJ library documentation for details on the underlying functionality
proj_trans(cbind(147, -42), "+proj=laea +type=crs", "EPSG:4326")
proj_trans(cbind(147, -42, -2), "+proj=laea +type=crs", "EPSG:4326")
proj_trans(cbind(147, -42, -2, 1), "+proj=laea +type=crs", "EPSG:4326")
proj_trans(wk::xy(147, -42, crs = "EPSG:4326"), "+proj=laea +type=crs")
proj_trans(wk::wkt("POLYGON ((1 1, 0 1, 0 0, 1 0, 1 1))", crs = "EPSG:4326"), 3112)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.