Skip to contents

Drop CRS from a SpatRaster or SpatVector

Usage

hsi_drop_crs(x)

Arguments

x

A SpatRaster or SpatVector.

Value

x with CRS set to "".

Details

GIS software (e.g. QGIS) often assigns a default CRS such as WGS84 to data that is in pixel coordinate space. HSItools calibration and co-registration functions require a NULL CRS to avoid misinterpretation of pixel coordinates as geographic coordinates. Use this function to strip an unwanted CRS before passing data to those functions.

Examples

x <- terra::rast(nrows = 9, ncols = 9, nlyr = 3)
terra::crs(x) <- "EPSG:4326"

x_stripped <- hsi_drop_crs(x)