PostGIS  2.5.7dev-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 291 of file gserialized_estimate.c.

292 {
293  int dims = 2;
294  if ( FLAGS_GET_GEODETIC(gbox->flags) )
295  return 3;
296  if ( FLAGS_GET_Z(gbox->flags) )
297  dims++;
298  if ( FLAGS_GET_M(gbox->flags) )
299  dims++;
300  return dims;
301 }
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
Definition: liblwgeom.h:140
#define FLAGS_GET_M(flags)
Definition: liblwgeom.h:141
#define FLAGS_GET_GEODETIC(flags)
Definition: liblwgeom.h:143
uint8_t flags
Definition: liblwgeom.h:294

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: