PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ ST_IsPolygonCW()

Datum ST_IsPolygonCW ( PG_FUNCTION_ARGS  )

Definition at line 869 of file lwgeom_functions_analytic.c.

870 {
871  GSERIALIZED* geom;
872  LWGEOM* input;
873  bool is_clockwise;
874 
875  if (PG_ARGISNULL(0))
876  PG_RETURN_NULL();
877 
878  geom = PG_GETARG_GSERIALIZED_P(0);
879  input = lwgeom_from_gserialized(geom);
880 
882 
883  lwgeom_free(input);
884  PG_FREE_IF_COPY(geom, 0);
885 
886  PG_RETURN_BOOL(is_clockwise);
887 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
Definition: gserialized.c:268
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1218
int lwgeom_is_clockwise(LWGEOM *lwgeom)
Ensure the outer ring is clockwise oriented and all inner rings are counter-clockwise.
Definition: lwgeom.c:66
static int is_clockwise(int num_points, double *x, double *y, double *z)

References is_clockwise(), lwgeom_free(), lwgeom_from_gserialized(), and lwgeom_is_clockwise().

Here is the call graph for this function: