PostGIS  2.1.10dev-r@@SVN_REVISION@@
Datum LWGEOM_isclosed ( PG_FUNCTION_ARGS  )

Definition at line 906 of file lwgeom_ogc.c.

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

907 {
908  GSERIALIZED *geom = (GSERIALIZED*)PG_DETOAST_DATUM(PG_GETARG_DATUM(0));
909  LWGEOM *lwgeom = lwgeom_from_gserialized(geom);
910  int closed = lwgeom_is_closed(lwgeom);
911 
912  lwgeom_free(lwgeom);
913  PG_FREE_IF_COPY(geom, 0);
914  PG_RETURN_BOOL(closed);
915 }
int lwgeom_is_closed(const LWGEOM *geom)
Return true or false depending on whether a geometry is a linear feature that closes on itself...
Definition: lwgeom.c:903
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1006
LWGEOM * geom

Here is the call graph for this function: