PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ ST_IsPolygonCW()

Datum ST_IsPolygonCW ( PG_FUNCTION_ARGS  )

Definition at line 1276 of file lwgeom_functions_analytic.c.

1277 {
1278  GSERIALIZED* geom;
1279  LWGEOM* input;
1280  bool is_clockwise;
1281 
1282  if (PG_ARGISNULL(0))
1283  PG_RETURN_NULL();
1284 
1285  geom = PG_GETARG_GSERIALIZED_P(0);
1286  input = lwgeom_from_gserialized(geom);
1287 
1289 
1290  lwgeom_free(input);
1291  PG_FREE_IF_COPY(geom, 0);
1292 
1293  PG_RETURN_BOOL(is_clockwise);
1294 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1144
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: