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

◆ ST_IsPolygonCCW()

Datum ST_IsPolygonCCW ( PG_FUNCTION_ARGS  )

Definition at line 1352 of file lwgeom_functions_analytic.c.

1353{
1354 GSERIALIZED* geom;
1355 LWGEOM* input;
1356 bool is_ccw;
1357
1358 if (PG_ARGISNULL(0))
1359 PG_RETURN_NULL();
1360
1361 geom = PG_GETARG_GSERIALIZED_P_COPY(0);
1362 input = lwgeom_from_gserialized(geom);
1364 is_ccw = lwgeom_is_clockwise(input);
1365 lwgeom_free(input);
1366 PG_FREE_IF_COPY(geom, 0);
1367
1368 PG_RETURN_BOOL(is_ccw);
1369}
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
void lwgeom_reverse_in_place(LWGEOM *lwgeom)
Reverse vertex order of LWGEOM.
Definition lwgeom.c:102

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

Here is the call graph for this function: