Compute a box for geom and all sub-geometries, if not already computed.
Definition at line 705 of file lwgeom.c.
711 if ( ! ( gbox || lwgeom->
bbox ) )
716 else if ( gbox && ! lwgeom->
bbox )
726 for ( i = 0; i < lwcol->
ngeoms; i++ )
GBOX * gbox_new(uint8_t flags)
Create a new gbox with the dimensionality indicated by the flags.
GBOX * gbox_clone(const GBOX *gbox)
#define FLAGS_SET_BBOX(flags, value)
int lwgeom_is_collection(const LWGEOM *geom)
Determine whether a LWGEOM can contain sub-geometries or not.
int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)
int lwgeom_calculate_gbox(const LWGEOM *lwgeom, GBOX *gbox)
Calculate the gbox for this geometry, a cartesian box or geodetic box, depending on how it is flagged...
void lwgeom_add_bbox_deep(LWGEOM *lwgeom, GBOX *gbox)
Compute a box for geom and all sub-geometries, if not already computed.
References LWGEOM::bbox, LWGEOM::flags, FLAGS_SET_BBOX, gbox_clone(), gbox_new(), LWCOLLECTION::geoms, lwgeom_add_bbox_deep(), lwgeom_calculate_gbox(), lwgeom_is_collection(), lwgeom_is_empty(), and LWCOLLECTION::ngeoms.
Referenced by geography_distance_knn(), geography_distance_uncached(), and lwgeom_add_bbox_deep().