Name

ST_3DLength — Returns the 3D length of a linear geometry.

Synopsis

float ST_3DLength(geometry a_3dlinestring);

Descrizione

Returns the 3-dimensional or 2-dimensional length of the geometry if it is a LineString or MultiLineString. For 2-d lines it will just return the 2-d length (same as ST_Length and ST_Length2D)

Questa funzione supporta il 3d e non distrugge gli z-index.

Questo metodo implementa la specifica SQL/MM. SQL-MM IEC 13249-3: 7.1, 10.3

Changed: 2.0.0 In prior versions this used to be called ST_Length3D

Esempi

Return length in feet for a 3D cable. Note this is in feet because EPSG:2249 is Massachusetts State Plane Feet

SELECT ST_3DLength(ST_GeomFromText('LINESTRING(743238 2967416 1,743238 2967450 1,743265 2967450 3,
743265.625 2967416 3,743238 2967416 3)',2249));
ST_3DLength
-----------
122.704716741457
                

Si veda anche

ST_Length, ST_Length2D