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

◆ lwgeom_force_clockwise()

void lwgeom_force_clockwise ( LWGEOM lwgeom)
extern

Force Right-hand-rule on LWGEOM polygons.

Definition at line 37 of file lwgeom.c.

38{
39 LWCOLLECTION *coll;
40 uint32_t i;
41
42 switch (lwgeom->type)
43 {
44 case POLYGONTYPE:
46 return;
47
48 case TRIANGLETYPE:
50 return;
51
52 /* Not handle POLYHEDRALSURFACE and TIN
53 as they are supposed to be well oriented */
55 case COLLECTIONTYPE:
56 coll = (LWCOLLECTION *)lwgeom;
57 for (i=0; i<coll->ngeoms; i++)
59 return;
60 }
61}
#define COLLECTIONTYPE
Definition liblwgeom.h:122
#define MULTIPOLYGONTYPE
Definition liblwgeom.h:121
#define POLYGONTYPE
Definition liblwgeom.h:118
#define TRIANGLETYPE
Definition liblwgeom.h:129
void lwtriangle_force_clockwise(LWTRIANGLE *triangle)
Definition lwtriangle.c:106
void lwpoly_force_clockwise(LWPOLY *poly)
Definition lwpoly.c:268
void lwgeom_force_clockwise(LWGEOM *lwgeom)
Force Right-hand-rule on LWGEOM polygons.
Definition lwgeom.c:37
uint32_t ngeoms
Definition liblwgeom.h:566
LWGEOM ** geoms
Definition liblwgeom.h:561
uint8_t type
Definition liblwgeom.h:448

References COLLECTIONTYPE, LWCOLLECTION::geoms, lwgeom_force_clockwise(), lwpoly_force_clockwise(), lwtriangle_force_clockwise(), MULTIPOLYGONTYPE, LWCOLLECTION::ngeoms, POLYGONTYPE, TRIANGLETYPE, and LWGEOM::type.

Referenced by lwgeom_force_clockwise(), LWGEOM_force_clockwise_poly(), mvt_grid_and_validate_geos(), and test_lwgeom_force_clockwise().

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