PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ ST_IsPolygonCW()

Datum ST_IsPolygonCW ( PG_FUNCTION_ARGS  )

Definition at line 1316 of file lwgeom_functions_analytic.c.

1317 {
1318  GSERIALIZED* geom;
1319  LWGEOM* input;
1320  bool is_clockwise;
1321 
1322  if (PG_ARGISNULL(0))
1323  PG_RETURN_NULL();
1324 
1325  geom = PG_GETARG_GSERIALIZED_P(0);
1326  input = lwgeom_from_gserialized(geom);
1327 
1329 
1330  lwgeom_free(input);
1331  PG_FREE_IF_COPY(geom, 0);
1332 
1333  PG_RETURN_BOOL(is_clockwise);
1334 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
Definition: gserialized.c:239
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1155
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: