# ST_Perimeter function

The ST_Perimeter function takes a surface or multisurface and, optionally, a unit as input parameters and returns the perimeter of the surface or multisurface, that is the length of its boundary, measured in the default or given units.

If the given surface or multisurface is null or is empty, null is returned.

This function can also be called as a method.

## Syntax

## Parameters

- surface
- A value of type ST_Surface, ST_MultiSurface, or one of their subtypes for which the perimeter is returned.
- unit
- A VARCHAR(128) value that identifies the units in which the perimeter
is measured. The supported units of measure are listed in the DB2GSE.ST_UNITS_OF_MEASURE
catalog view. If the
*unit*parameter is omitted, the following rules are used to determine the unit in which the perimeter is measured:- If
*surface*is in a projected or geocentric coordinate system, the linear unit associated with this coordinate system is the default. - If
*surface*is in a geographic coordinate system, the angular unit associated with this coordinate system is the default.

**Restrictions on unit conversions:**An error (SQLSTATE 38SU4) is returned if any of the following conditions occur:- The geometry is in an unspecified coordinate system and the
*unit*parameter is specified. - The geometry is in a projected coordinate system and an angular unit is specified.
- The geometry is in a geographic coordinate system and a linear unit is specified.

- If

## Return type

DOUBLE