PostGIS  2.1.10dev-r@@SVN_REVISION@@
int lwgeom_needs_bbox ( const LWGEOM geom)

Check whether or not a lwgeom is big enough to warrant a bounding box.

Check whether or not a lwgeom is big enough to warrant a bounding box when stored in the serialized form on disk. Currently only points are considered small enough to not require a bounding box, because the index operations can generate a large number of box-retrieval operations when scanning keys.

Definition at line 1059 of file lwgeom.c.

References LW_FALSE, LW_TRUE, POINTTYPE, and LWGEOM::type.

Referenced by GEOS2POSTGIS(), gserialized_from_lwgeom(), lwgeom_from_gserialized(), LWGEOM_from_WKB(), LWGEOM_in(), LWGEOM_recv(), LWGEOMFromWKB(), and SFCGALGeometry2POSTGIS().

1060 {
1061  assert(geom);
1062  if ( geom->type == POINTTYPE )
1063  {
1064  return LW_FALSE;
1065  }
1066  return LW_TRUE;
1067 }
#define LW_FALSE
Definition: liblwgeom.h:52
#define LW_TRUE
Return types for functions with status returns.
Definition: liblwgeom.h:51
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
Definition: liblwgeom.h:60
uint8_t type
Definition: liblwgeom.h:352

Here is the caller graph for this function: