PostGIS_AddBBox

Name

PostGIS_AddBBox — Add bounding box to the geometry.

Synopsis

geometry PostGIS_AddBBox ( geometry geomA ) ;

Description

Add bounding box to the geometry. This would make bounding box based queries faster, but will increase the size of the geometry.

[Note]

Bounding boxes are automatically added to geometries so in general this is not needed unless the generated bounding box somehow becomes corrupted or you have an old install that is lacking bounding boxes. Then you need to drop the old and readd.

This method supports Circular Strings and Curves

Examples

UPDATE sometable
 SET the_geom =  PostGIS_AddBBox(the_geom)
 WHERE PostGIS_HasBBox(the_geom) = false;