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

Sets the Georeference information of an object in a single call. Accepts inputs in `GDAL` and `ESRI` format.
Default format is `GDAL`. If all 6 parameters are not provided then will return null.

For more information about ScaleX, ScaleY, SkewX, SkewY, please refer to the [Affine Transformations](/reference/wherobots-db/raster-data/raster-affine-transformation) section.

<img src="https://mintcdn.com/wherobots/AayJA2u8CknIeTgt/images/sql-functions/RS_SetGeoReference/RS_SetGeoReference.svg?fit=max&auto=format&n=AayJA2u8CknIeTgt&q=85&s=1faa4cf23b1ec985cd455d7b08a53528" alt="RS_SetGeoReference" width="700" height="440" data-path="images/sql-functions/RS_SetGeoReference/RS_SetGeoReference.svg" />

## Signatures

```sql theme={"system"}
RS_SetGeoReference(raster: Raster, geoRefCoord: String, format: String = "GDAL")
```

```sql theme={"system"}
RS_SetGeoReference(raster: Raster, upperLeftX: Double, upperLeftY: Double, scaleX: Double, scaleY: Double, skewX: Double, skewY: Double)
```

## Parameters

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

<ParamField body="upperLeftX" type="Double">
  The upper left x value.
</ParamField>

<ParamField body="upperLeftY" type="Double">
  The upper left y value.
</ParamField>

<ParamField body="scaleX" type="Double">
  The scale x value.
</ParamField>

<ParamField body="scaleY" type="Double">
  The scale y value.
</ParamField>

<ParamField body="skewX" type="Double">
  The skew x value.
</ParamField>

<ParamField body="skewY" type="Double">
  The skew y value.
</ParamField>

<ParamField body="geoRefCoord" type="String">
  The geo ref coord value.
</ParamField>

<ParamField body="format" type="String" default="&#x22;GDAL&#x22;">
  The format value.
</ParamField>

## Return type

<ResponseField type="Raster">
  The resulting raster.
</ResponseField>

## Examples

```
ScaleX SkewY SkewX ScaleY UpperLeftX UpperLeftY
```

`ESRI`

```
ScaleX SkewY SkewX ScaleY (UpperLeftX + ScaleX * 0.5) (UpperLeftY + ScaleY * 0.5)
```

```sql theme={"system"}
SELECT RS_GeoReference(
        RS_SetGeoReference(
            RS_MakeEmptyRaster(1, 20, 20, 2, 22, 2, 3, 1, 1, 0),
            '3 1.5 1.5 2 22 3'
        )
    )
```

```
3.000000
1.500000
1.500000
2.000000
22.000000
3.000000
```

```sql theme={"system"}
SELECT RS_GeoReference(
        RS_SetGeoReference(
            RS_MakeEmptyRaster(1, 20, 20, 2, 22, 2, 3, 1, 1, 0),
            '3 1.5 1.5 2 22 3', 'ESRI'
        )
    )
```

```
3.000000
1.500000
1.500000
2.000000
20.500000
2.000000
```

```sql theme={"system"}
SELECT RS_GeoReference(
        RS_SetGeoReference(
            RS_MakeEmptyRaster(2, 5, 5, 0, 0, 1, -1, 0, 0, 0),
            8, -3, 4, 5, 0.2, 0.2
        )
    )
```

```
4.000000
0.200000
0.200000
5.000000
8.000000
-3.000000
```
