PostGIS  3.3.9dev-r@@SVN_REVISION@@

◆ ST_FlipCoordinates()

Datum ST_FlipCoordinates ( PG_FUNCTION_ARGS  )

Definition at line 2937 of file lwgeom_functions_basic.c.

2938 {
2939  GSERIALIZED *in = PG_GETARG_GSERIALIZED_P_COPY(0);
2940  GSERIALIZED *out;
2941  LWGEOM *lwgeom = lwgeom_from_gserialized(in);
2942 
2944  out = geometry_serialize(lwgeom);
2945 
2946  lwgeom_free(lwgeom);
2947  PG_FREE_IF_COPY(in, 0);
2948 
2949  PG_RETURN_POINTER(out);
2950 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
Definition: gserialized.c:239
@ LWORD_Y
Definition: liblwgeom.h:147
@ LWORD_X
Definition: liblwgeom.h:146
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1155
void lwgeom_swap_ordinates(LWGEOM *in, LWORD o1, LWORD o2)
Swap ordinate values in every vertex of the geometry.
Definition: lwgeom.c:1478

References lwgeom_free(), lwgeom_from_gserialized(), lwgeom_swap_ordinates(), LWORD_X, and LWORD_Y.

Here is the call graph for this function: