PostGIS  2.3.7dev-r@@SVN_REVISION@@
Datum LWGEOM_reverse ( PG_FUNCTION_ARGS  )

Definition at line 1874 of file lwgeom_functions_basic.c.

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

1875 {
1876  GSERIALIZED *geom;
1877  LWGEOM *lwgeom;
1878 
1879  POSTGIS_DEBUG(2, "LWGEOM_reverse called");
1880 
1881  geom = PG_GETARG_GSERIALIZED_P_COPY(0);
1882 
1883  lwgeom = lwgeom_from_gserialized(geom);
1884  lwgeom_reverse(lwgeom);
1885 
1886  geom = geometry_serialize(lwgeom);
1887 
1888  PG_RETURN_POINTER(geom);
1889 }
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:64
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)

Here is the call graph for this function: