ST_Perimeter

Determine the perimeter of a geometry.

Syntax

ST_Perimeter(geo[, unit]]);
geo
The input geometry.

Type: ST_GEOMETRY(ANY)

unit
The units. Possible values include 'meter', 'kilometer', 'foot', 'mile', and 'nautical mile'.

Type: VARCHAR(ANY)

Default: 'meter'

Returns

A value of type DOUBLE that represents the perimeter of the geometry.

Examples

SELECT inza..ST_Perimeter(inza..ST_WKTToSQL('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))', 27700));

ST_PERIMETER
--------------
4
(1 row)


SELECT inza..ST_Perimeter(inza..ST_WKTToSQL('MULTIPOLYGON(((0 0, 0 1, 1 1, 1 0, 0 0)), ((10 10, 10 14, 15 14, 15 10, 10 10)))', 27700));

ST_PERIMETER
--------------
22
(1 row)