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

◆ ST_IsPolygonCW()

Datum ST_IsPolygonCW ( PG_FUNCTION_ARGS  )

Definition at line 1325 of file lwgeom_functions_analytic.c.

1326{
1327 GSERIALIZED* geom;
1328 LWGEOM* input;
1329 bool is_clockwise;
1330
1331 if (PG_ARGISNULL(0))
1332 PG_RETURN_NULL();
1333
1334 geom = PG_GETARG_GSERIALIZED_P(0);
1335 input = lwgeom_from_gserialized(geom);
1336
1338
1339 lwgeom_free(input);
1340 PG_FREE_IF_COPY(geom, 0);
1341
1342 PG_RETURN_BOOL(is_clockwise);
1343}
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition lwgeom.c:1138
int lwgeom_is_clockwise(LWGEOM *lwgeom)
Ensure the outer ring is clockwise oriented and all inner rings are counter-clockwise.
Definition lwgeom.c:65
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: