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

Definition at line 1906 of file lwgeom_functions_basic.c.

References geometry_serialize(), lwgeom_from_gserialized(), and lwgeom_reverse().

1907 {
1908  GSERIALIZED *geom;
1909  LWGEOM *lwgeom;
1910 
1911  POSTGIS_DEBUG(2, "LWGEOM_reverse called");
1912 
1913  geom = (GSERIALIZED *)PG_DETOAST_DATUM_COPY(PG_GETARG_DATUM(0));
1914 
1915  lwgeom = lwgeom_from_gserialized(geom);
1916  lwgeom_reverse(lwgeom);
1917 
1918  geom = geometry_serialize(lwgeom);
1919 
1920  PG_RETURN_POINTER(geom);
1921 }
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: