Skip to main content
Returns a binary DataFrame from a Raster DataFrame. Each raster object in the resulting DataFrame is a GeoTiff image in binary format.

Signatures

RS_AsGeoTiff(raster: Raster)
RS_AsGeoTiff(raster: Raster, tileSize: Int)
RS_AsGeoTiff(raster: Raster, compressionType: String, imageQuality: Double)
RS_AsGeoTiff(raster: Raster, compressionType: String, imageQuality: Double, tileSize: Int)
RS_AsGeoTiff(raster: Raster, compressionType: String, imageQuality: Double, tileWidth: Int, tileHeight: Int)

Parameters

raster
Raster
required
The input raster.
compressionType
String
The compression type. Possible values: None, PackBits, Deflate, Huffman, LZW and JPEG.
imageQuality
Double
The image quality. Any decimal number between 0 and 1. 0 means the lowest quality and 1 means the highest quality.
tileSize
Int
default:"256"
The width and height of the internal tiles in the GeoTiff file.
tileWidth
Int
The width of the internal tiles in the GeoTiff file.
tileHeight
Int
The height of the internal tiles in the GeoTiff file.

Return type

The raster in GeoTiff binary format.

Examples

SELECT RS_AsGeoTiff(raster) FROM my_raster_table
SELECT RS_AsGeoTiff(raster, 'LZW', 0.75) FROM my_raster_table
+--------------------+
|             geotiff|
+--------------------+
|[4D 4D 00 2A 00 0...|
+--------------------+