3094 ospec = PG_GETARG_CSTRING(1);
3095 if (strlen(ospec) != 2)
3098 "Invalid ordinate specification. "
3099 "Need two letters from the set (x,y,z,m). "
3107 in = PG_GETARG_GSERIALIZED_P_COPY(0);
3112 lwpgerror(
"Geometry does not have an M ordinate");
3117 lwpgerror(
"Geometry does not have a Z ordinate");
3123 PG_RETURN_POINTER(in);
3127 out = geometry_serialize(lwgeom);
3129 PG_FREE_IF_COPY(in, 0);
3130 PG_RETURN_POINTER(out);
int gserialized_has_m(const GSERIALIZED *g)
Check if a GSERIALIZED has an M ordinate.
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
int gserialized_has_z(const GSERIALIZED *g)
Check if a GSERIALIZED has a Z ordinate.
void lwgeom_free(LWGEOM *geom)
void lwgeom_swap_ordinates(LWGEOM *in, LWORD o1, LWORD o2)
Swap ordinate values in every vertex of the geometry.
enum LWORD_T LWORD
Ordinate names.
static LWORD ordname2ordval(char n)