Skip to content

RS_GeoReference

Returns the georeference metadata of raster as a string in GDAL or ESRI format as commonly seen in a world file. Default is GDAL if not specified. Both formats output six lines: scalex, skewy, skewx, scaley, upperleftx, upperlefty. In GDAL format the upper-left coordinates refer to the corner of the upper-left pixel, while in ESRI format they are shifted to the center of the upper-left pixel.

Usage

utf8 RS_GeoReference(rast: raster)
utf8 RS_GeoReference(rast: raster, format: utf8)

Arguments

  • rast (raster): Input raster
  • format (utf8): Output format, either ‘GDAL’ (default) or ‘ESRI’. GDAL reports the upper-left corner of the upper-left pixel; ESRI shifts the coordinates to the center of the upper-left pixel.

Examples

SELECT RS_GeoReference(RS_Example());
┌───────────────────────────────┐
│ rs_georeference(rs_example()) │
│              utf8             │
╞═══════════════════════════════╡
│ 2.0000000000…                 │
└───────────────────────────────┘