ST_Perimeter
Determine the perimeter of a geometry.
Syntax
ST_Perimeter(geo[, unit[, cSys]]]);
- geo
- The input geometry.
Type: VARCHAR(ANY)
- unit
- The units. Possible values include 'meter', 'kilometer', 'foot', 'mile', and 'nautical
mile'.
Type: VARCHAR(ANY)
Default: 'meter'
- cSys
- The coordinate system of the input geometry.
Type: VARCHAR(ANY)
Default: The coordinate system of the input geometry's SRID or, if the input geometry has no SRID, 'WGS84'.
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))',
1234));
ST_PERIMETER
--------------
4
(1 row)
SELECT inza..ST_Perimeter(inza..ST_WKTToSQL('MULTIPOLYGON(((0 0, 0 1, 1 1, 1 0, 0 0)),((0 0, 0 4, 5 4, 5 0, 0 0)))', 1234));
ST_PERIMETER
--------------
22
(1 row)