PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ LWGEOM_reverse()

Datum LWGEOM_reverse ( PG_FUNCTION_ARGS  )

Definition at line 1881 of file lwgeom_functions_basic.c.

1882 {
1883  GSERIALIZED *geom;
1884  LWGEOM *lwgeom;
1885 
1886  POSTGIS_DEBUG(2, "LWGEOM_reverse called");
1887 
1888  geom = PG_GETARG_GSERIALIZED_P_COPY(0);
1889 
1890  lwgeom = lwgeom_from_gserialized(geom);
1891  lwgeom_reverse_in_place(lwgeom);
1892 
1893  geom = geometry_serialize(lwgeom);
1894 
1895  PG_RETURN_POINTER(geom);
1896 }
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:102
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)

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

Here is the call graph for this function: