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

◆ nd_box_from_gbox()

static void nd_box_from_gbox ( const GBOX gbox,
ND_BOX nd_box 
)
static

Set the values of an ND_BOX from a GBOX.

Definition at line 496 of file gserialized_estimate.c.

497{
498 volatile int d = 0;
499 POSTGIS_DEBUGF(3, " %s", gbox_to_string(gbox));
500
501 nd_box_init(nd_box);
502 nd_box->min[d] = gbox->xmin;
503 nd_box->max[d] = gbox->xmax;
504 d++;
505 nd_box->min[d] = gbox->ymin;
506 nd_box->max[d] = gbox->ymax;
507 d++;
508 if ( FLAGS_GET_GEODETIC(gbox->flags) )
509 {
510 nd_box->min[d] = gbox->zmin;
511 nd_box->max[d] = gbox->zmax;
512 return;
513 }
514 if ( FLAGS_GET_Z(gbox->flags) )
515 {
516 nd_box->min[d] = gbox->zmin;
517 nd_box->max[d] = gbox->zmax;
518 d++;
519 }
520 if ( FLAGS_GET_M(gbox->flags) )
521 {
522 nd_box->min[d] = gbox->mmin;
523 nd_box->max[d] = gbox->mmax;
524 d++;
525 }
526 return;
527}
char * gbox_to_string(const GBOX *gbox)
Allocate a string representation of the GBOX, based on dimensionality of flags.
Definition gbox.c:404
static int nd_box_init(ND_BOX *a)
Zero out an ND_BOX.
#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
double ymax
Definition liblwgeom.h:357
double zmax
Definition liblwgeom.h:359
double xmax
Definition liblwgeom.h:355
double zmin
Definition liblwgeom.h:358
double mmax
Definition liblwgeom.h:361
double ymin
Definition liblwgeom.h:356
double xmin
Definition liblwgeom.h:354
double mmin
Definition liblwgeom.h:360
lwflags_t flags
Definition liblwgeom.h:353

References GBOX::flags, FLAGS_GET_GEODETIC, FLAGS_GET_M, FLAGS_GET_Z, gbox_to_string(), ND_BOX_T::max, ND_BOX_T::min, GBOX::mmax, GBOX::mmin, nd_box_init(), GBOX::xmax, GBOX::xmin, GBOX::ymax, GBOX::ymin, GBOX::zmax, and GBOX::zmin.

Referenced by compute_gserialized_stats_mode(), and estimate_selectivity().

Here is the call graph for this function:
Here is the caller graph for this function: