PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ LWGEOM_length_linestring()

Datum LWGEOM_length_linestring ( PG_FUNCTION_ARGS  )

Definition at line 318 of file lwgeom_functions_basic.c.

319 {
320  GSERIALIZED *geom = PG_GETARG_GSERIALIZED_P(0);
321  LWGEOM *lwgeom = lwgeom_from_gserialized(geom);
322  double dist = lwgeom_length(lwgeom);
323  lwgeom_free(lwgeom);
324  PG_FREE_IF_COPY(geom, 0);
325  PG_RETURN_FLOAT8(dist);
326 }
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(const LWGEOM *geom)
Definition: lwgeom.c:1952

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

Here is the call graph for this function: