PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ LWGEOM_zmflag()

Datum LWGEOM_zmflag ( PG_FUNCTION_ARGS  )

Definition at line 1910 of file lwgeom_functions_basic.c.

References gserialized_has_m(), gserialized_has_z(), LWGEOM_hasz(), and PG_FUNCTION_INFO_V1().

Referenced by LWGEOM_noop().

1911 {
1912  GSERIALIZED *in;
1913  int ret = 0;
1914 
1915  in = PG_GETARG_GSERIALIZED_P(0);
1916  if ( gserialized_has_z(in) ) ret += 2;
1917  if ( gserialized_has_m(in) ) ret += 1;
1918  PG_FREE_IF_COPY(in, 0);
1919  PG_RETURN_INT16(ret);
1920 }
int gserialized_has_m(const GSERIALIZED *gser)
Check if a GSERIALIZED has an M ordinate.
Definition: g_serialized.c:29
int gserialized_has_z(const GSERIALIZED *gser)
Check if a GSERIALIZED has a Z ordinate.
Definition: g_serialized.c:24
Here is the call graph for this function:
Here is the caller graph for this function: