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

Definition at line 1975 of file lwgeom_functions_basic.c.

References gserialized_has_m(), and gserialized_has_z().

1976 {
1977  GSERIALIZED *in;
1978  int ret = 0;
1979 
1980  in = (GSERIALIZED *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0));
1981  if ( gserialized_has_z(in) ) ret += 2;
1982  if ( gserialized_has_m(in) ) ret += 1;
1983  PG_FREE_IF_COPY(in, 0);
1984  PG_RETURN_INT16(ret);
1985 }
int gserialized_has_m(const GSERIALIZED *gser)
Check if a GSERIALIZED has an M ordinate.
Definition: g_serialized.c:30
int gserialized_has_z(const GSERIALIZED *gser)
Check if a GSERIALIZED has a Z ordinate.
Definition: g_serialized.c:25

Here is the call graph for this function: