Learn R Programming

terra (version 1.9-46)

has.geoloc: Geolocation arrays and GCPs

Description

Detect whether a SpatRaster source has GDAL geolocation arrays (e.g. satellite swath / curvilinear NetCDF) and/or Ground Control Points (GCPs), and report the associated spatial reference and array paths.

When a file has no conventional geotransform but does have a GEOLOCATION metadata domain (or GCPs), rast stores that information on the source and, if the dataset itself has no CRS, applies the geolocation/GCP CRS automatically so that project can use the arrays.

Usage

# S4 method for SpatRaster
has.geoloc(x)

# S4 method for SpatRaster geoloc(x)

Value

has.geoloc: logical, one value per raster data source.

geoloc: data.frame with one row per source and columns geolocation (logical), gcps (logical), srs (character), x / y (paths to the X/Y geolocation datasets when present).

Arguments

x

SpatRaster

See Also

project, rectify, is.rotated, crs

Examples

Run this code
r <- rast(nrows=10, ncols=10)
has.geoloc(r)
geoloc(r)

Run the code above in your browser using DataLab