0

Whenever I execute this query:

SELECT ST_Length3D(ST_GeomFromEWKT('LINESTRING(0 0 0,5 0 3,5 10 5)')); 

Postgresql is throwing an error:

ERROR: function st_length3d(geometry) does not exist SQL state: 42883

but this query running fine and showing result:

SELECT ST_Length(ST_GeomFromEWKT('LINESTRING(0 0 0,5 0 3,5 10 5)'));

It seems that ST_Length3D is not added in my system defined function any idea how to recover this ?

0

In PostGIS 2.x, the function ST_Length3d has been renamed ST_3dLength: ST_3DLength. This query will work:

# SELECT ST_3dLength(ST_GeomFromEWKT('LINESTRING(0 0 0,5 0 3,5 10 5)'));
   st_3dlength    
------------------
 16.0289909220309
(1 row)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.