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

Definition at line 1231 of file lwgeom_functions_analytic.c.

References dumpnode::geom, is_clockwise(), lwgeom_free(), lwgeom_from_gserialized(), and lwgeom_is_clockwise().

1232 {
1233  GSERIALIZED* geom;
1234  LWGEOM* input;
1235  bool is_clockwise;
1236 
1237  if (PG_ARGISNULL(0))
1238  PG_RETURN_NULL();
1239 
1240  geom = PG_GETARG_GSERIALIZED_P(0);
1241  input = lwgeom_from_gserialized(geom);
1242 
1243  is_clockwise = lwgeom_is_clockwise(input);
1244 
1245  lwgeom_free(input);
1246  PG_FREE_IF_COPY(geom, 0);
1247 
1248  PG_RETURN_BOOL(is_clockwise);
1249 }
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
static int is_clockwise(int num_points, double *x, double *y, double *z)
int lwgeom_is_clockwise(LWGEOM *lwgeom)
Ensure the outer ring is clockwise oriented and all inner rings are counter-clockwise.
Definition: lwgeom.c:64

Here is the call graph for this function: