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

Returns the pixel width of the raster in CRS units.

<Note>
  RS\_ScaleX attempts to get an Affine transform on the grid in order to return scaleX (See [World File](https://en.wikipedia.org/wiki/World_file) for more details). If the transform on the geometry is not an Affine transform, RS\_ScaleX will throw an UnsupportedException:

  ```
  UnsupportedOperationException("Only AffineTransform2D is supported")
  ```
</Note>

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_ScaleX/RS_ScaleX.svg?fit=max&auto=format&n=AayJA2u8CknIeTgt&q=85&s=f87c671ef8ff181e165c7676f03c5d27" alt="RS_ScaleX" width="580" height="320" data-path="images/sql-functions/RS_ScaleX/RS_ScaleX.svg" />

## Signatures

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

## Parameters

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

## Return type

<ResponseField type="Double">
  A numeric value.
</ResponseField>

## Example

```sql theme={"system"}
SELECT RS_ScaleX(raster) FROM rasters
```

```
1
```
