This topic describes the ST_Perimeter2D function. This function calculates the 2D perimeter of a geometry object. This function is equivalent to the ST_Perimeter function.
Syntax
float ST_Perimeter2D(geometry geomA);
Parameters
Parameter | Description |
---|---|
geomA | The geometry object that you want to specify. |
Examples
Calculate the 2D perimeter of a geometry object by using the default parameter settings.
SELECT ST_Perimeter2D('POLYGON((0 0,0 2,2 2,2 0,0 0))'::geometry);
st_perimeter
--------------
8
(1 row)