PostGIS  2.1.10dev-r@@SVN_REVISION@@
const GBOX* lwgeom_get_bbox ( const LWGEOM lwgeom)

Get a non-empty geometry bounding box, computing and caching it if not already there.

NOTE: empty geometries don't have a bounding box so you'd still get a NULL for them.

Definition at line 596 of file lwgeom.c.

References LWGEOM::bbox, and lwgeom_add_bbox().

Referenced by lwgeom_extent_to_gml2(), and lwgeom_extent_to_gml3().

597 {
598  /* add it if not already there */
599  lwgeom_add_bbox((LWGEOM *)lwg);
600  return lwg->bbox;
601 }
void lwgeom_add_bbox(LWGEOM *lwgeom)
Ensure there's a box in the LWGEOM.
Definition: lwgeom.c:555

Here is the call graph for this function:

Here is the caller graph for this function: