Calculate box (x/y) and add values to gbox.
Return LW_SUCCESS on success.
Definition at line 601 of file gbox.c.
602{
605 if (!gbox)
607
611 LWDEBUGF(4,
"ptarray_calculate_gbox Z: %d M: %d", has_z, has_m);
612 int coordinates = 2 + has_z + has_m;
613
614 switch (coordinates)
615 {
616 case 2:
617 {
619 break;
620 }
621 case 3:
622 {
623 if (has_z)
624 {
626 }
627 else
628 {
629 double zmin = gbox->
zmin;
630 double zmax = gbox->
zmax;
636 }
637 break;
638 }
639 default:
640 {
642 break;
643 }
644 }
646}
static void ptarray_calculate_gbox_cartesian_2d(const POINTARRAY *pa, GBOX *gbox)
static void ptarray_calculate_gbox_cartesian_3d(const POINTARRAY *pa, GBOX *gbox)
static void ptarray_calculate_gbox_cartesian_4d(const POINTARRAY *pa, GBOX *gbox)
#define FLAGS_GET_Z(flags)
#define FLAGS_GET_M(flags)
lwflags_t lwflags(int hasz, int hasm, int geodetic)
Construct a new flags bitmask.
#define LWDEBUGF(level, msg,...)
References GBOX::flags, POINTARRAY::flags, FLAGS_GET_M, FLAGS_GET_Z, LW_FAILURE, LW_SUCCESS, LWDEBUGF, lwflags(), GBOX::mmax, GBOX::mmin, POINTARRAY::npoints, ptarray_calculate_gbox_cartesian_2d(), ptarray_calculate_gbox_cartesian_3d(), ptarray_calculate_gbox_cartesian_4d(), GBOX::zmax, and GBOX::zmin.
Referenced by LWGEOM_interiorringn_polygon(), lwline_calculate_gbox_cartesian(), lwpoint_calculate_gbox_cartesian(), lwpoly_calculate_gbox_cartesian(), and lwtriangle_calculate_gbox_cartesian().