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

# ST_Scale

This function scales the geometry to a new size by multiplying the ordinates with the corresponding scaling factors provided as parameters `scaleX` and `scaleY`.

<Note>
  This function is designed for scaling 2D geometries. While it currently doesn't support scaling the Z and M coordinates, it preserves these values during the scaling operation.
</Note>

<img src="https://mintcdn.com/wherobots/wLm_IRUSNlHZTHJP/images/sql-functions/ST_Scale/ST_Scale.svg?fit=max&auto=format&n=wLm_IRUSNlHZTHJP&q=85&s=e37659fbe51e2d261593872d61cf78bd" alt="ST_Scale" width="400" height="180" data-path="images/sql-functions/ST_Scale/ST_Scale.svg" />

## Signatures

```sql theme={"system"}
ST_Scale(geometry: Geometry, scaleX: Double, scaleY: Double)
```

## Parameters

<ParamField body="geometry" type="Geometry" required>
  The input geometry.
</ParamField>

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

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

## Return type

<ResponseField type="Geometry">
  The resulting geometry.
</ResponseField>

## Example

```sql theme={"system"}
SELECT ST_Scale(
        ST_GeomFromWKT('POLYGON ((0 0, 0 1.5, 1.5 1.5, 1.5 0, 0 0))'),
       3, 2
)
```

```
POLYGON ((0 0, 0 3, 4.5 3, 4.5 0, 0 0))
```
