Calculate geodetic (x/y/z) box and add values to gbox.
Return LW_SUCCESS on success.
Definition at line 2879 of file lwgeodetic.c.
2908 for ( i = 1; i < pa->
npoints; i++ )
int gbox_merge(const GBOX *new_box, GBOX *merge_box)
Update the merged GBOX to be large enough to include itself and the new box.
void gbox_duplicate(const GBOX *original, GBOX *duplicate)
Copy the values of original GBOX into duplicate.
void gbox_init(GBOX *gbox)
Zero out all the entries in the GBOX.
#define LW_TRUE
Return types for functions with status returns.
void ll2cart(const POINT2D *g, POINT3D *p)
Convert lon/lat coordinates to cartesian coordinates on unit sphere.
int edge_calculate_gbox(const POINT3D *A1, const POINT3D *A2, GBOX *gbox)
The magic function, given an edge in spherical coordinates, calculate a 3D bounding box that fully co...
static const POINT2D * getPoint2d_cp(const POINTARRAY *pa, uint32_t n)
Returns a POINT2D pointer into the POINTARRAY serialized_ptlist, suitable for reading from.
References edge_calculate_gbox(), GBOX::flags, gbox_duplicate(), gbox_init(), gbox_merge(), getPoint2d_cp(), ll2cart(), LW_FAILURE, LW_FALSE, LW_SUCCESS, LW_TRUE, POINTARRAY::npoints, POINT3D::x, GBOX::xmax, GBOX::xmin, POINT3D::y, GBOX::ymax, GBOX::ymin, POINT3D::z, GBOX::zmax, and GBOX::zmin.
Referenced by lwline_calculate_gbox_geodetic(), lwpoint_calculate_gbox_geodetic(), lwpolygon_calculate_gbox_geodetic(), and lwtriangle_calculate_gbox_geodetic().