PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

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

225{
226 int dims = 2;
227 if ( FLAGS_GET_GEODETIC(gbox->flags) )
228 return 3;
229 if ( FLAGS_GET_Z(gbox->flags) )
230 dims++;
231 if ( FLAGS_GET_M(gbox->flags) )
232 dims++;
233 return dims;
234}
#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: