Skip to content

ST_Scale

Scales a geometry by multiplying ordinates with scale factors.

Usage

geometry ST_Scale(geom: geometry, scaleX: double, scaleY: double)
geometry ST_Scale(geom: geometry, scaleX: double, scaleY: double, scaleZ: double)

Arguments

  • geom (geometry): Input geometry
  • scaleX (double)
  • scaleY (double)
  • scaleZ (double)

Description

Scales a geometry by multiplying each coordinate by the corresponding scale factor. A 3D variant accepts scaleZ.

Examples

SELECT ST_Scale(ST_GeomFromText('POINT (1 2)'), 2.0, 3.0);
┌──────────────────────────────────────────────────────────────────────┐
│ st_scale(st_geomfromtext(Utf8("POINT (1 2)")),Float64(2),Float64(3)) │
│                               geometry                               │
╞══════════════════════════════════════════════════════════════════════╡
│ POINT(2 6)                                                           │
└──────────────────────────────────────────────────────────────────────┘