PostGIS  3.6.1dev-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 dimensionality, we have a little utility function to make it easy.

Definition at line 297 of file gserialized_estimate.c.

298 {
299  int dims = 2;
300  if ( FLAGS_GET_GEODETIC(gbox->flags) )
301  return 3;
302  if ( FLAGS_GET_Z(gbox->flags) )
303  dims++;
304  if ( FLAGS_GET_M(gbox->flags) )
305  dims++;
306  return dims;
307 }
#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: