PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ ptarray_calculate_gbox_cartesian_4d()

static void ptarray_calculate_gbox_cartesian_4d ( const POINTARRAY pa,
GBOX gbox 
)
static

Definition at line 577 of file gbox.c.

578 {
579  const POINT4D *p = getPoint4d_cp(pa, 0);
580 
581  gbox->xmax = gbox->xmin = p->x;
582  gbox->ymax = gbox->ymin = p->y;
583  gbox->zmax = gbox->zmin = p->z;
584  gbox->mmax = gbox->mmin = p->m;
585 
586  for (uint32_t i = 1; i < pa->npoints; i++)
587  {
588  p = getPoint4d_cp(pa, i);
589  gbox->xmin = FP_MIN(gbox->xmin, p->x);
590  gbox->xmax = FP_MAX(gbox->xmax, p->x);
591  gbox->ymin = FP_MIN(gbox->ymin, p->y);
592  gbox->ymax = FP_MAX(gbox->ymax, p->y);
593  gbox->zmin = FP_MIN(gbox->zmin, p->z);
594  gbox->zmax = FP_MAX(gbox->zmax, p->z);
595  gbox->mmin = FP_MIN(gbox->mmin, p->m);
596  gbox->mmax = FP_MAX(gbox->mmax, p->m);
597  }
598 }
#define FP_MAX(A, B)
#define FP_MIN(A, B)
static const POINT4D * getPoint4d_cp(const POINTARRAY *pa, uint32_t n)
Returns a POINT2D pointer into the POINTARRAY serialized_ptlist, suitable for reading from.
Definition: lwinline.h:115
double ymax
Definition: liblwgeom.h:343
double zmax
Definition: liblwgeom.h:345
double xmax
Definition: liblwgeom.h:341
double zmin
Definition: liblwgeom.h:344
double mmax
Definition: liblwgeom.h:347
double ymin
Definition: liblwgeom.h:342
double xmin
Definition: liblwgeom.h:340
double mmin
Definition: liblwgeom.h:346
double m
Definition: liblwgeom.h:400
double x
Definition: liblwgeom.h:400
double z
Definition: liblwgeom.h:400
double y
Definition: liblwgeom.h:400
uint32_t npoints
Definition: liblwgeom.h:413

References FP_MAX, FP_MIN, getPoint4d_cp(), POINT4D::m, GBOX::mmax, GBOX::mmin, POINTARRAY::npoints, POINT4D::x, GBOX::xmax, GBOX::xmin, POINT4D::y, GBOX::ymax, GBOX::ymin, POINT4D::z, GBOX::zmax, and GBOX::zmin.

Referenced by ptarray_calculate_gbox_cartesian().

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