lidR (version 2.1.2)

lastransform: Datum transformation for LAS objects

Description

A version of spTrasform for LAS objects. Returns transformed coordinates of a LAS object from the projection of the object to the the projection given by arguments.

Usage

lastransform(las, CRSobj)

Arguments

las

An object of class LAS

CRSobj

logical. Object of class CRS or of class character, in which case it is converted to CRS.

Value

An object of class LAS with coordinates XY transformed to the new coordinate reference system. The header has been update by add the ESPG code or a WKT OGC CS string as a function of the defined Global Encoding WKT bit (see LAS specifications).

Examples

Run this code
# NOT RUN {
LASfile <- system.file("extdata", "Megaplot.laz", package="lidR")
las <- readLAS(LASfile, select = "xyzrn")
crs <- sp::CRS("+init=epsg:26918")

las <- lastransform(las, crs)
# }

Run the code above in your browser using DataLab