PostGIS  3.3.9dev-r@@SVN_REVISION@@

◆ LWGEOM_force_clockwise_poly()

Datum LWGEOM_force_clockwise_poly ( PG_FUNCTION_ARGS  )

Definition at line 1949 of file lwgeom_functions_basic.c.

1950 {
1951  GSERIALIZED *ingeom, *outgeom;
1952  LWGEOM *lwgeom;
1953 
1954  POSTGIS_DEBUG(2, "LWGEOM_force_clockwise_poly called");
1955 
1956  ingeom = PG_GETARG_GSERIALIZED_P_COPY(0);
1957 
1958  lwgeom = lwgeom_from_gserialized(ingeom);
1959  lwgeom_force_clockwise(lwgeom);
1960 
1961  outgeom = geometry_serialize(lwgeom);
1962 
1963  lwgeom_free(lwgeom);
1964  PG_FREE_IF_COPY(ingeom, 0);
1965  PG_RETURN_POINTER(outgeom);
1966 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
Definition: gserialized.c:239
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1155
void lwgeom_force_clockwise(LWGEOM *lwgeom)
Force Right-hand-rule on LWGEOM polygons.
Definition: lwgeom.c:38

References lwgeom_force_clockwise(), lwgeom_free(), and lwgeom_from_gserialized().

Here is the call graph for this function: