
Geolocation arrays and GCPs
has.geoloc.RdDetect 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.
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).
Examples
r <- rast(nrows=10, ncols=10)
has.geoloc(r)
#> [1] FALSE
geoloc(r)
#> geolocation gcps srs x y
#> 1 FALSE FALSE