ST_Perimeter — Returns the length measurement of the boundary of a Polygon or a MultiPolygon.
double ST_Perimeter(bytea
LineString);
Returns the length measurement of the boundary of a Polygon or a MultiPolygon. Distance units are those of the geometry spatial reference system.
SQL-MM defines this function for Polygons and MultiPolygons. But in Jaspa returns the 2d length of any Geometry. Linear geometries return their length. Areal geometries return their perimeter.
![]() | |
GeometryCollections are supported |
| 2D | 3D | M |
|---|---|---|
![]() | ![]() | ![]() |
| OGC SFS for SQL. 1.1 (1999) | OGC SFS for SQL. 1.1.0 (2005) | OGC SFS for SQL. 1.2.0 (2006) | SQL-MM Part 3 |
|---|---|---|---|
| - | - | - | 8.1.3 , 9.5.4 |
SELECT ST_Perimeter(ST_GeomFromText('LINESTRING (0 0, 10 10, 10 5, 15 10)'));
--Result
26.2132034355964
SELECT ST_Perimeter(ST_GeomFromText('POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))'));
--Result
40
SELECT ST_Perimeter(ST_GeomFromText('
GEOMETRYCOLLECTION(LINESTRING (0 0, 10 10, 10 5, 15 10),POLYGON((0 0, 0 10, 10 10, 10 0, 0 0)))'));
--Result
66.21320343559643