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

Returns a binary DataFrame from a Raster DataFrame. Each raster object in the resulting DataFrame is an ArcGrid image in binary format. ArcGrid only takes 1 source band. If your raster has multiple bands, you need to specify which band you want to use as the source.

## Signatures

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

```sql theme={"system"}
RS_AsArcGrid(raster: Raster, sourceBand: Integer)
```

## Parameters

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

<ParamField body="sourceBand" type="Integer" default="0">
  The source band index to use. Accepts any non-negative value (>=0). If not given, it will use Band 0.
</ParamField>

## Return type

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

## Examples

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

```sql theme={"system"}
SELECT RS_AsArcGrid(raster, 1) FROM my_raster_table
```

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