PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ LWGEOM_reverse()

Datum LWGEOM_reverse ( PG_FUNCTION_ARGS  )

Definition at line 1841 of file lwgeom_functions_basic.c.

References dumpnode::geom, geometry_serialize(), LWGEOM_force_clockwise_poly(), lwgeom_from_gserialized(), lwgeom_reverse(), and PG_FUNCTION_INFO_V1().

Referenced by LWGEOM_segmentize2d().

1842 {
1843  GSERIALIZED *geom;
1844  LWGEOM *lwgeom;
1845 
1846  POSTGIS_DEBUG(2, "LWGEOM_reverse called");
1847 
1848  geom = PG_GETARG_GSERIALIZED_P_COPY(0);
1849 
1850  lwgeom = lwgeom_from_gserialized(geom);
1851  lwgeom_reverse(lwgeom);
1852 
1853  geom = geometry_serialize(lwgeom);
1854 
1855  PG_RETURN_POINTER(geom);
1856 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
LWGEOM * geom
void lwgeom_reverse(LWGEOM *lwgeom)
Reverse vertex order of LWGEOM.
Definition: lwgeom.c:51
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)
Here is the call graph for this function:
Here is the caller graph for this function: