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

Definition at line 1878 of file lwgeom_functions_basic.c.

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

1879 {
1880  GSERIALIZED *geom;
1881  LWGEOM *lwgeom;
1882 
1883  POSTGIS_DEBUG(2, "LWGEOM_reverse called");
1884 
1885  geom = PG_GETARG_GSERIALIZED_P_COPY(0);
1886 
1887  lwgeom = lwgeom_from_gserialized(geom);
1888  lwgeom_reverse_in_place(lwgeom);
1889 
1890  geom = geometry_serialize(lwgeom);
1891 
1892  PG_RETURN_POINTER(geom);
1893 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_reverse_in_place(LWGEOM *lwgeom)
Reverse vertex order of LWGEOM.
Definition: lwgeom.c:101
LWGEOM * geom
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)

Here is the call graph for this function: