]> granicus.if.org Git - postgis/commitdiff
Remove duplicate and unused is_worth_caching_serialized_bbox and is_worth_caching_lwg...
authorPaul Ramsey <pramsey@cleverelephant.ca>
Thu, 27 Oct 2011 19:10:23 +0000 (19:10 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Thu, 27 Oct 2011 19:10:23 +0000 (19:10 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8016 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/liblwgeom.h.in
postgis/lwgeom_geos.c
postgis/lwgeom_inout.c

index 3bca34caf86bccfbc12357db48e4c6203870f1c0..45179e5e4be857ff856bb2dea658bea51c062189 100644 (file)
@@ -843,14 +843,6 @@ extern BOX3D *compute_serialized_box3d(uint8_t *serialized_form);
 extern int compute_serialized_box3d_p(uint8_t *serialized_form, BOX3D *box);
 
 
-/*
- * Evaluate with an heuristic if the provided PG_LWGEOM is worth
- * caching a bbox
- */
-char is_worth_caching_serialized_bbox(const uint8_t *);
-char is_worth_caching_lwgeom_bbox(const LWGEOM *);
-
-
 /*
  * This function computes the size in bytes
  * of the serialized geometries.
index bb6bea41d875b5c84c7763d053180a66d1c837cf..0298f45ddfabe919038b08be50183caaf4f8381b 100644 (file)
@@ -3322,7 +3322,7 @@ GEOS2POSTGIS(GEOSGeom geom, char want3d)
 
        POSTGIS_DEBUGF(4, "GEOS2POSTGIS: GEOS2LWGEOM returned a %s", lwgeom_summary(lwgeom, 0));
 
-       if ( is_worth_caching_lwgeom_bbox(lwgeom) )
+       if ( lwgeom_needs_bbox(lwgeom) == LW_TRUE )
        {
                lwgeom_add_bbox(lwgeom);
        }
index 25ae70818b4050c725b350aa3b8416875642dee0..4ef211025e5d212ca79afa8790eb1a7e2965d82c 100644 (file)
@@ -400,26 +400,6 @@ Datum LWGEOM_addBBOX(PG_FUNCTION_ARGS)
        PG_RETURN_POINTER(result);
 }
 
-char
-is_worth_caching_serialized_bbox(const uint8_t *in)
-{
-#if ! POSTGIS_AUTOCACHE_BBOX
-       return false;
-#endif
-       if ( TYPE_GETTYPE((uint8_t)in[0]) == POINTTYPE ) return false;
-       return true;
-}
-
-char
-is_worth_caching_lwgeom_bbox(const LWGEOM *in)
-{
-#if ! POSTGIS_AUTOCACHE_BBOX
-       return false;
-#endif
-       if ( TYPE_GETTYPE(in->type) == POINTTYPE ) return false;
-       return true;
-}
-
 /* removes a bbox from a geometry */
 PG_FUNCTION_INFO_V1(LWGEOM_dropBBOX);
 Datum LWGEOM_dropBBOX(PG_FUNCTION_ARGS)