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

Definition at line 283 of file gserialized_estimate.c.

284{
285 int dims = 2;
286 if ( FLAGS_GET_GEODETIC(gbox->flags) )
287 return 3;
288 if ( FLAGS_GET_Z(gbox->flags) )
289 dims++;
290 if ( FLAGS_GET_M(gbox->flags) )
291 dims++;
292 return dims;
293}
#define FLAGS_GET_Z(flags)
Definition liblwgeom.h:179
#define FLAGS_GET_M(flags)
Definition liblwgeom.h:180
#define FLAGS_GET_GEODETIC(flags)
Definition liblwgeom.h:182
lwflags_t flags
Definition liblwgeom.h:339

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: