From 9e3874ff5fd99a5d0f3aa7384ee87e16b2a91839 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Wed, 27 Oct 2004 11:02:24 +0000 Subject: [PATCH] Removed another getbox2d() call. git-svn-id: http://svn.osgeo.org/postgis/trunk@1046 b70326c6-7e19-0410-871a-916f4a2858ee --- lwgeom/lwgeom_estimate.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lwgeom/lwgeom_estimate.c b/lwgeom/lwgeom_estimate.c index bc8321a01..011a41fc7 100644 --- a/lwgeom/lwgeom_estimate.c +++ b/lwgeom/lwgeom_estimate.c @@ -10,6 +10,9 @@ * ********************************************************************** * $Log$ + * Revision 1.11 2004/10/27 11:02:24 strk + * Removed another getbox2d() call. + * * Revision 1.10 2004/10/25 17:07:09 strk * Obsoleted getbox2d(). Use getbox2d_p() or getbox2d_internal() instead. * @@ -883,7 +886,14 @@ Datum LWGEOM_gist_sel(PG_FUNCTION_ARGS) in = (char *)PG_DETOAST_DATUM( ((Const*)other)->constvalue ); //search_box = convert_box3d_to_box(&in->bvol); - search_box = getbox2d(in+4); + if ( ! getbox2d_p(in+4, &search_box) ) + { + // empty geom +#if DEBUG_GEOMETRY_STATS + elog(NOTICE, "search box is EMPTY"); +#endif + PG_RETURN_FLOAT8(0.0); + } //elog(NOTICE,"requested search box is : (%.15g %.15g, %.15g %.15g)",search_box->xmin,search_box->ymin,search_box->xmax,search_box->ymax); -- 2.40.0