proj: Reproject with sf

View source: R/proj.R

projR Documentation

Reproject with sf

Description

Structure of input can be a matrix or a data.frame or anything coercible to a matrix. Output maintains the structure of the input, but reprojects the first two (or three or four) columns.

Usage

proj(x, target, ..., source = NULL, yx = FALSE)

proj_xy(x, target, ..., source = NULL, yx = FALSE, gdal = FALSE)

proj_xyz(x, target, ..., source = NULL, yx = FALSE, gdal = FALSE)

Arguments

x

points

target

projection of output (WKT, projstring, auth:code, anything proj understands)

...

argments ignored

source

projection of input (same format as target)

yx

use authority compliance

Details

Use 'proj_xy' and 'proj_xyz' for clarity on those specific cases.

If input has more than 4 columns, it's assumed only the first two are used as per 'proj_xy'.

Value

matrix of projected points

Examples

proj_xy(cbind(147, -42), "+proj=laea")

mdsumner/basf documentation built on Sept. 11, 2022, 1:08 p.m.