ST_Length — Returns the 2d length of the geometry if it is a linestring or multilinestring.
float ST_Length(geometry a_2dlinestring
Returns the 2D length of the geometry if it is a linestring, multilinestring, ST_Curve, ST_MultiCurve. 0 is returned for areal geometries. For areal geometries use ST_Perimeter. Measurements are in the units of the spatial reference system of the geometry.
Currently this is an alias for ST_Length2D, but this may change to support higher dimensions.
This method implements the OpenGIS Simple Features Implementation Specification for SQL. OGC SPEC 126.96.36.199
This method implements the SQL/MM specification: SQL-MM 3: 7.1.2, 9.3.4
Return length in feet for line string. Note this is in feet because 2249 is Mass State Plane Feet
SELECT SELECT ST_Length(ST_GeomFromText('LINESTRING(743238 2967416,743238 2967450,743265 2967450, 743265.625 2967416,743238 2967416)',2249)); st_length --------- 122.630744000095 (1 row)