Skip to main content

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.

This function scales the geometry to a new size by multiplying the ordinates with the corresponding scaling factors provided as parameters scaleX and scaleY.
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.
ST_Scale

Signatures

ST_Scale(geometry: Geometry, scaleX: Double, scaleY: Double)

Parameters

geometry
Geometry
required
The input geometry.
scaleX
Double
required
The scale x value.
scaleY
Double
required
The scale y value.

Return type

The resulting geometry.

Example

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))