PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ lwgeom_calculate_gbox()

int lwgeom_calculate_gbox ( const LWGEOM lwgeom,
GBOX gbox 
)

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

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

Definition at line 737 of file lwgeom.c.

738 {
739  gbox->flags = lwgeom->flags;
740  if( FLAGS_GET_GEODETIC(lwgeom->flags) )
741  return lwgeom_calculate_gbox_geodetic(lwgeom, gbox);
742  else
743  return lwgeom_calculate_gbox_cartesian(lwgeom, gbox);
744 }
int lwgeom_calculate_gbox_cartesian(const LWGEOM *lwgeom, GBOX *gbox)
Calculate the 2-4D bounding box of a geometry.
Definition: gbox.c:740
int lwgeom_calculate_gbox_geodetic(const LWGEOM *geom, GBOX *gbox)
Calculate the geodetic bounding box for an LWGEOM.
Definition: lwgeodetic.c:3028
#define FLAGS_GET_GEODETIC(flags)
Definition: liblwgeom.h:182
lwflags_t flags
Definition: liblwgeom.h:339
lwflags_t flags
Definition: liblwgeom.h:447

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

Referenced by BOX3D_combine(), create_v_line(), geometry_to_polygon(), gserialized1_get_gbox_p(), gserialized2_get_gbox_p(), lw_dist2d_check_overlap(), lwcollection_extract(), lwgeom_add_bbox(), lwgeom_add_bbox_deep(), lwgeom_cpa_within(), LWGEOM_envelope(), LWGEOM_expand(), lwgeom_from_gserialized1(), lwgeom_from_gserialized2(), lwgeom_tcpa(), LWGEOM_to_BOX(), LWGEOM_to_BOX2D(), LWGEOM_to_BOX3D(), lwpoly_to_points(), mvt_clip_and_validate(), mvt_iterate_clip_by_box_geos(), mvt_safe_clip_polygon_by_box(), mvt_unsafe_clip_by_box(), ST_TileEnvelope(), test_gserialized1_peek_gbox_p_gets_correct_box(), test_gserialized2_peek_gbox_p_gets_correct_box(), and test_gserialized_get_gbox_geocentric().

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