Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.wherobots.com/llms.txt

Use this file to discover all available pages before exploring further.

Returns a Cloud Optimized GeoTiff (COG) binary from a raster. COG is a GeoTiff file format optimized for efficient cloud-based access, with internal tiling and overviews that enable partial reads over HTTP range requests.

Signatures

RS_AsCOG(raster: Raster)
RS_AsCOG(raster: Raster, compression: String)
RS_AsCOG(raster: Raster, compression: String, tileSize: Int)
RS_AsCOG(raster: Raster, compression: String, tileSize: Int, quality: Double)
RS_AsCOG(raster: Raster, compression: String, tileSize: Int, quality: Double, resampling: String)
RS_AsCOG(raster: Raster, compression: String, tileSize: Int, quality: Double, resampling: String, overviewCount: Int)

Parameters

raster
Raster
required
The input raster.
compression
String
The compression type. Possible values: None, Deflate, LZW, JPEG, PackBits, Huffman.
tileSize
Int
default:"256"
The width and height of the internal tiles in the COG file.
quality
Double
The compression quality. A decimal number between 0 and 1, where 0 means lowest quality and 1 means highest quality. Only applicable to JPEG compression; ignored for lossless codecs.
resampling
String
The resampling method used for overview generation. Possible values: NearestNeighbor, Bilinear, Bicubic.
overviewCount
Int
The number of overview levels to generate.

Return type

The raster in Cloud Optimized GeoTiff binary format.

Examples

SELECT RS_AsCOG(raster) FROM my_raster_table
SELECT RS_AsCOG(raster, 'JPEG', 256, 0.75, 'Bilinear') FROM my_raster_table