PostGIS  2.1.10dev-r@@SVN_REVISION@@
int lwgeom_calculate_gbox ( const LWGEOM lwgeom,
GBOX gbox 

Calculate the gbox for this goemetry, a cartesian box or geodetic box, depending on how it is flagged.

Calculate bounding box of a geometry, automatically taking into account whether it is cartesian or geodetic.

Definition at line 608 of file lwgeom.c.

References GBOX::flags, LWGEOM::flags, FLAGS_GET_GEODETIC, lwgeom_calculate_gbox_cartesian(), and lwgeom_calculate_gbox_geodetic().

Referenced by BOX3D_combine(), geometry_to_polygon(), gserialized_datum_get_box2df_p(), gserialized_get_gbox_p(), lw_dist2d_check_overlap(), lwcollection_extract(), lwgeom_add_bbox(), lwgeom_add_bbox_deep(), LWGEOM_envelope(), LWGEOM_expand(), lwgeom_from_gserialized(), LWGEOM_to_BOX(), LWGEOM_to_BOX2D(), LWGEOM_to_BOX3D(), and test_gserialized_get_gbox_geocentric().

609 {
610  gbox->flags = lwgeom->flags;
611  if( FLAGS_GET_GEODETIC(lwgeom->flags) )
612  return lwgeom_calculate_gbox_geodetic(lwgeom, gbox);
613  else
614  return lwgeom_calculate_gbox_cartesian(lwgeom, gbox);
615 }
int lwgeom_calculate_gbox_geodetic(const LWGEOM *geom, GBOX *gbox)
Calculate the geodetic bounding box for an LWGEOM.
Definition: lwgeodetic.c:2612
#define FLAGS_GET_GEODETIC(flags)
Definition: liblwgeom.h:109
uint8_t flags
Definition: liblwgeom.h:353
uint8_t flags
Definition: liblwgeom.h:247
int lwgeom_calculate_gbox_cartesian(const LWGEOM *lwgeom, GBOX *gbox)
Calculate the 2-4D bounding box of a geometry.
Definition: g_box.c:607

Here is the call graph for this function:

Here is the caller graph for this function: