PostGIS  2.5.0dev-r@@SVN_REVISION@@
Datum LWGEOM_length_linestring ( PG_FUNCTION_ARGS  )

Definition at line 313 of file lwgeom_functions_basic.c.

References dumpnode::geom, lwgeom_free(), lwgeom_from_gserialized(), and lwgeom_length().

314 {
315  GSERIALIZED *geom = PG_GETARG_GSERIALIZED_P(0);
316  LWGEOM *lwgeom = lwgeom_from_gserialized(geom);
317  double dist = lwgeom_length(lwgeom);
318  lwgeom_free(lwgeom);
319  PG_FREE_IF_COPY(geom, 0);
320  PG_RETURN_FLOAT8(dist);
321 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1137
LWGEOM * geom
double lwgeom_length(const LWGEOM *geom)
Definition: lwgeom.c:1917

Here is the call graph for this function: