ST_PERIMETER
functionsupportedCore SQL functionsReturns the length of the perimeter of the polygon(s) in a GEOGRAPHY or GEOMETRY object.
Syntax
ST_PERIMETER( <geography_or_geometry_expression> )
Parameters
| Name | Required | Description |
|---|---|---|
geography_or_geometry_expression | required | The argument must be of type GEOGRAPHY or GEOMETRY. |
Returns
Returns a REAL value, which represents the length: - For GEOGRAPHY objects, the length is in meters. - For GEOMETRY objects, the length is computed with the same unit used to define the coordinates.
Usage notes
- If geography_or_geometry_expression is not a Polygon, MultiPolygon, or GeometryCollection containing Polygons, ST_PERIMETER returns 0.
- If geography_or_geometry_expression is a GeometryCollection, ST_PERIMETER returns the sum of the perimeters of the Polygons in the collection.
- Use this function (rather than ST_LENGTH) to get the perimeter of a Polygon.