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

Subtract two spectral bands in a Geotiff image(band2 - band1)

## Signatures

```sql theme={"system"}
RS_Subtract (Band1: ARRAY[Double], Band2: ARRAY[Double])
```

## Parameters

<ParamField body="Band1" type="ARRAY[Double]" required>
  The first spectral band.
</ParamField>

<ParamField body="Band2" type="ARRAY[Double]" required>
  The second spectral band.
</ParamField>

## Return type

<ResponseField type="Array<Double>">
  An array of double values.
</ResponseField>

## Example

```scala theme={"system"}
val subtractDF = spark.sql("select RS_Subtract(band1, band2) as differenceOfOfBands from dataframe")
```
