PostGIS  2.2.7dev-r@@SVN_REVISION@@
Datum LWGEOM_length2d_linestring ( PG_FUNCTION_ARGS  )

Definition at line 279 of file lwgeom_functions_basic.c.

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

280 {
281  GSERIALIZED *geom = PG_GETARG_GSERIALIZED_P(0);
282  LWGEOM *lwgeom = lwgeom_from_gserialized(geom);
283  double dist = lwgeom_length_2d(lwgeom);
284  lwgeom_free(lwgeom);
285  PG_FREE_IF_COPY(geom, 0);
286  PG_RETURN_FLOAT8(dist);
287 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1050
double lwgeom_length_2d(const LWGEOM *geom)
Definition: lwgeom.c:1668
LWGEOM * geom

Here is the call graph for this function: