PostGIS  3.4.0dev-r@@SVN_REVISION@@
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages

◆ LWGEOM_length2d_linestring()

Datum LWGEOM_length2d_linestring ( PG_FUNCTION_ARGS  )

Definition at line 300 of file lwgeom_functions_basic.c.

301 {
302  GSERIALIZED *geom = PG_GETARG_GSERIALIZED_P(0);
303  LWGEOM *lwgeom = lwgeom_from_gserialized(geom);
304  double dist = lwgeom_length_2d(lwgeom);
305  lwgeom_free(lwgeom);
306  PG_FREE_IF_COPY(geom, 0);
307  PG_RETURN_FLOAT8(dist);
308 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
Definition: gserialized.c:239
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1155
double lwgeom_length_2d(const LWGEOM *geom)
Definition: lwgeom.c:1974

References lwgeom_free(), lwgeom_from_gserialized(), and lwgeom_length_2d().

Here is the call graph for this function: