RS_AsGeoTiff¶
Introduction: Returns a binary value (byte array) encoding the input raster as a GeoTiff image.
Possible values for compressionType: None, PackBits, Deflate, Huffman, LZW and JPEG
Possible values for imageQuality: any decimal number between 0 and 1. 0 means the lowest quality and 1 means the highest quality.
Format:
RS_AsGeoTiff(raster: Raster)
RS_AsGeoTiff(raster: Raster, compressionType: String, imageQuality: Double)
Return type: Binary
Since: v1.4.1
SQL Example
SELECT RS_AsGeoTiff(raster) FROM my_raster_table
SQL Example
SELECT RS_AsGeoTiff(raster, 'LZW', 0.75) FROM my_raster_table
Output:
+--------------------+
| geotiff|
+--------------------+
|[4D 4D 00 2A 00 0...|
+--------------------+
Output schema:
root
|-- geotiff: binary (nullable = true)