PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ LWGEOM_isclosed()

Datum LWGEOM_isclosed ( PG_FUNCTION_ARGS  )

Definition at line 1014 of file lwgeom_ogc.c.

1015{
1016 GSERIALIZED *geom = PG_GETARG_GSERIALIZED_P(0);
1017 LWGEOM *lwgeom = lwgeom_from_gserialized(geom);
1018 int closed = lwgeom_is_closed(lwgeom);
1019
1020 lwgeom_free(lwgeom);
1021 PG_FREE_IF_COPY(geom, 0);
1022 PG_RETURN_BOOL(closed);
1023}
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
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:1081
void lwgeom_free(LWGEOM *geom)
Definition lwgeom.c:1246

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

Here is the call graph for this function: