Fork me on GitHub

ST_MultiplyZ

Signature

GEOMETRY ST_MultiplyZ(GEOMETRY geom, DOUBLE zFactor);

Description

Multiply the z-value of each coordinate of geom by a zFactor. Non-existent z-values are not updated.

Examples

SELECT ST_MultiplyZ('MULTIPOINT((190 300 1), (10 11 50))', 10);
-- Answer:           MULTIPOINT((190 300 10), (10 11 500))

-- Non-existent z-values are not updated:
SELECT ST_MultiplyZ('MULTIPOINT((190 300), (10 11))', 10);
-- Answer:           MULTIPOINT((190 300), (10 11)
SELECT ST_MultiplyZ('MULTIPOINT((190 300 10), (10 11))', 10);
-- Answer:           MULTIPOINT((190 300 100), (10 11))
See also