Skip to main content
Returns the total length of the one-dimensional components of a native GEO value. GEOGRAPHY results are meters along great-circle edges. GEOMETRY results use the coordinate units of the input CRS.

Syntax

LINESTRING and MULTILINESTRING contribute their segment lengths. Line components inside a GEOMETRYCOLLECTION are summed recursively. Points and polygon boundaries contribute zero; use ST_Perimeter for polygon boundaries. NULL produces NULL; an EMPTY value produces 0. Malformed WKB, unsupported dimensions or descriptors, ambiguous antipodal spherical segments, and topologically invalid inputs produce a controlled error.

Examples

Keywords

ST_LENGTH,ST,LENGTH,GEOGRAPHY,GEOMETRY GEOGRAPHY, GEOMETRY, DOUBLE