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

◆ lwpoly_is_clockwise()

int lwpoly_is_clockwise ( LWPOLY poly)

Definition at line 288 of file lwpoly.c.

289{
290 uint32_t i;
291
292 if ( lwpoly_is_empty(poly) )
293 return LW_TRUE;
294
295 if ( ptarray_isccw(poly->rings[0]) )
296 return LW_FALSE;
297
298 for ( i = 1; i < poly->nrings; i++)
299 if ( !ptarray_isccw(poly->rings[i]) )
300 return LW_FALSE;
301
302 return LW_TRUE;
303}
#define LW_FALSE
Definition liblwgeom.h:94
#define LW_TRUE
Return types for functions with status returns.
Definition liblwgeom.h:93
int lwpoly_is_empty(const LWPOLY *poly)
int ptarray_isccw(const POINTARRAY *pa)
Definition ptarray.c:1174
POINTARRAY ** rings
Definition liblwgeom.h:519
uint32_t nrings
Definition liblwgeom.h:524

References LW_FALSE, LW_TRUE, lwpoly_is_empty(), LWPOLY::nrings, ptarray_isccw(), and LWPOLY::rings.

Referenced by lwgeom_is_clockwise().

Here is the call graph for this function:
Here is the caller graph for this function: