PostGIS  2.2.7dev-r@@SVN_REVISION@@
static int gbox_ndims ( const GBOX gbox)
static

Given that geodetic boxes are X/Y/Z regardless of the underlying geometry dimensionality and other boxes are guided by HAS_Z/HAS_M in their dimesionality, we have a little utility function to make it easy.

Definition at line 220 of file gserialized_estimate.c.

References GBOX::flags, FLAGS_GET_GEODETIC, FLAGS_GET_M, and FLAGS_GET_Z.

Referenced by compute_gserialized_stats_mode(), and estimate_selectivity().

221 {
222  int dims = 2;
223  if ( FLAGS_GET_GEODETIC(gbox->flags) )
224  return 3;
225  if ( FLAGS_GET_Z(gbox->flags) )
226  dims++;
227  if ( FLAGS_GET_M(gbox->flags) )
228  dims++;
229  return dims;
230 }
#define FLAGS_GET_GEODETIC(flags)
Definition: liblwgeom.h:127
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
Definition: liblwgeom.h:124
uint8_t flags
Definition: liblwgeom.h:275
#define FLAGS_GET_M(flags)
Definition: liblwgeom.h:125

Here is the caller graph for this function: