PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ lwpoly_force_clockwise()

void lwpoly_force_clockwise ( LWPOLY poly)

Definition at line 268 of file lwpoly.c.

269 {
270  uint32_t i;
271 
272  /* No-op empties */
273  if ( lwpoly_is_empty(poly) )
274  return;
275 
276  /* External ring */
277  if ( ptarray_isccw(poly->rings[0]) )
279 
280  /* Internal rings */
281  for (i=1; i<poly->nrings; i++)
282  if ( ! ptarray_isccw(poly->rings[i]) )
284 
285 }
void ptarray_reverse_in_place(POINTARRAY *pa)
Definition: ptarray.c:341
int ptarray_isccw(const POINTARRAY *pa)
Definition: ptarray.c:1028
int lwpoly_is_empty(const LWPOLY *poly)
Definition: lwpoly.c:418
POINTARRAY ** rings
Definition: liblwgeom.h:460
uint32_t nrings
Definition: liblwgeom.h:458
unsigned int uint32_t
Definition: uthash.h:78

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

Referenced by lwgeom_force_clockwise().

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