Calculate box (x/y) and add values to gbox.
Return LW_SUCCESS on success.
Definition at line 613 of file gbox.c.
614{
617 if (!gbox)
619
623 LWDEBUGF(4,
"ptarray_calculate_gbox Z: %d M: %d", has_z, has_m);
624 int coordinates = 2 + has_z + has_m;
625
626 switch (coordinates)
627 {
628 case 2:
629 {
631 break;
632 }
633 case 3:
634 {
635 if (has_z)
636 {
638 }
639 else
640 {
641 double zmin = gbox->
zmin;
642 double zmax = gbox->
zmax;
648 }
649 break;
650 }
651 default:
652 {
654 break;
655 }
656 }
658}
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 box3d_transform(), LWGEOM_interiorringn_polygon(), lwline_calculate_gbox_cartesian(), lwpoint_calculate_gbox_cartesian(), lwpoly_calculate_gbox_cartesian(), and lwtriangle_calculate_gbox_cartesian().