Skip to main content
Returns a raster geometry from a GeoTiff file.

Signatures

RS_FromGeoTiff(content: ARRAY[Byte])
RS_FromGeoTiff(content: ARRAY[Byte], autoRescale: Boolean)

Parameters

content
ARRAY[Byte]
required
A byte array that contains the content of the GeoTiff file.
autoRescale
Boolean
default:"true"
Whether to rescale the pixel values using the scale and offset values in the GeoTiff file. The default value is true.

Return type

The resulting raster.

Example

var df = sedona.read.format("binaryFile").load("/some/path/*.tiff")
df = df.withColumn("raster", f.expr("RS_FromGeoTiff(content)"))