PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ gbox_ndims()

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 300 of file gserialized_estimate.c.

301 {
302  int dims = 2;
303  if ( FLAGS_GET_GEODETIC(gbox->flags) )
304  return 3;
305  if ( FLAGS_GET_Z(gbox->flags) )
306  dims++;
307  if ( FLAGS_GET_M(gbox->flags) )
308  dims++;
309  return dims;
310 }
#define FLAGS_GET_Z(flags)
Definition: liblwgeom.h:165
#define FLAGS_GET_M(flags)
Definition: liblwgeom.h:166
#define FLAGS_GET_GEODETIC(flags)
Definition: liblwgeom.h:168
lwflags_t flags
Definition: liblwgeom.h:353

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

Referenced by compute_gserialized_stats_mode(), and estimate_selectivity().

Here is the caller graph for this function: