Nome

ST_3DLength — Retorna o centro geométrico de uma geometria.

Sinopse

float ST_3DLength(geometry a_3dlinestring);

Descrição

Retorna o comprimento 3-dimensional ou 2-dimensional da geometria se for uma linestring ou multi-linestring. Para linhas 2-d, ela só retornará o comprimento 2-d (o mesmo da ST_Length e ST_Length2D)

This function supports 3d and will not drop the z-index.

This method implements the SQL/MM specification. SQL-MM IEC 13249-3: 7.1, 10.3

Alterações: 2.0.0 Nas versões anteriores era chamado de ST_Length3D

Exemplos

Retorna o comprimento em pés para um cabo 3D. Note que é em pés, porque EPSG:2249 é Massachusetts State Plane Feet

Code
SELECT ST_3DLength(ST_GeomFromText(
'LINESTRING(743238 2967416 1,743238 2967450 1,743265 2967450 3,
743265.625 2967416 3,743238 2967416 3)',
2249));
Raster Outputs
122.70471674145682
Figure
Geometry figure for visual-st-3dlength-01

Veja também

ST_Length, ST_Length2D