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

Extract a band from a raster as an array of doubles.

## Signatures

```sql theme={"system"}
RS_BandAsArray(raster: Raster, bandIndex: Integer)
```

## Parameters

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

<ParamField body="bandIndex" type="Integer" required>
  The 1-indexed band to extract.
</ParamField>

## Return type

<ResponseField type="Array<Double>">
  An array of double values representing the pixel values of the specified band.
</ResponseField>

## Example

```sql theme={"system"}
SELECT RS_BandAsArray(raster, 1) FROM raster_table
```

```
+--------------------+
|                band|
+--------------------+
|[0.0, 0.0, 0.0, 0...|
+--------------------+
```
