> ## 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.

# RS_AsGeoTiff

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

## Signatures

```sql theme={"system"}
RS_AsGeoTiff(raster: Raster)
```

```sql theme={"system"}
RS_AsGeoTiff(raster: Raster, tileSize: Int)
```

```sql theme={"system"}
RS_AsGeoTiff(raster: Raster, compressionType: String, imageQuality: Double)
```

```sql theme={"system"}
RS_AsGeoTiff(raster: Raster, compressionType: String, imageQuality: Double, tileSize: Int)
```

```sql theme={"system"}
RS_AsGeoTiff(raster: Raster, compressionType: String, imageQuality: Double, tileWidth: Int, tileHeight: Int)
```

## Parameters

<ParamField body="raster" type="Raster" required>
  The input raster.
</ParamField>

<ParamField body="compressionType" type="String">
  The compression type. Possible values: `None`, `PackBits`, `Deflate`, `Huffman`, `LZW` and `JPEG`.
</ParamField>

<ParamField body="imageQuality" type="Double">
  The image quality. Any decimal number between 0 and 1. 0 means the lowest quality and 1 means the highest quality.
</ParamField>

<ParamField body="tileSize" type="Int" default="256">
  The width and height of the internal tiles in the GeoTiff file.
</ParamField>

<ParamField body="tileWidth" type="Int">
  The width of the internal tiles in the GeoTiff file.
</ParamField>

<ParamField body="tileHeight" type="Int">
  The height of the internal tiles in the GeoTiff file.
</ParamField>

## Return type

<ResponseField type="Binary">
  The raster in GeoTiff binary format.
</ResponseField>

## Examples

```sql theme={"system"}
SELECT RS_AsGeoTiff(raster) FROM my_raster_table
```

```sql theme={"system"}
SELECT RS_AsGeoTiff(raster, 'LZW', 0.75) FROM my_raster_table
```

```
+--------------------+
|             geotiff|
+--------------------+
|[4D 4D 00 2A 00 0...|
+--------------------+
```
