From fd175ffbaad9454d1b9011784a083283e44e9568 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Mon, 13 Dec 2004 12:25:27 +0000 Subject: [PATCH] Removed obsoleted function and fixed some warnings. git-svn-id: http://svn.osgeo.org/postgis/trunk@1135 b70326c6-7e19-0410-871a-916f4a2858ee --- lwgeom/lwgeom_api.c | 44 ---------------------------------------- lwgeom/lwgeom_estimate.c | 4 +++- 2 files changed, 3 insertions(+), 45 deletions(-) diff --git a/lwgeom/lwgeom_api.c b/lwgeom/lwgeom_api.c index 96cffcb40..1c9da6544 100644 --- a/lwgeom/lwgeom_api.c +++ b/lwgeom/lwgeom_api.c @@ -309,50 +309,6 @@ BOX3D *combine_boxes(BOX3D *b1, BOX3D *b2) return result; } -// returns a real entity so it doesnt leak -// if this has a pre-built BOX2d, then we use it, -// otherwise we need to compute it. -// OBSOLETED! -BOX2DFLOAT4 -__getbox2d(char *serialized_form) -{ - int type = (unsigned char) serialized_form[0]; - char *loc; - BOX2DFLOAT4 result; - BOX3D *box3d; - - loc = serialized_form+1; - -//lwnotice("getbox2d: type is %d", type); - - if (lwgeom_hasBBOX(type)) - { - //woot - this is easy -//lwnotice("getbox2d has box"); - memcpy(&result,loc, sizeof(BOX2DFLOAT4)); - return result; - } - - //we have to actually compute it! -//lwnotice("getbox2d -- computing bbox"); - box3d = lw_geom_getBB_simple(serialized_form); -//lwnotice("lw_geom_getBB_simple got bbox3d(%.15g %.15g,%.15g %.15g)",box3d->xmin,box3d->ymin,box3d->xmax,box3d->ymax); - - if ( ! box3d_to_box2df_p(box3d, &result) ) - { - lwerror("Error converting box3d to box2df"); - } - - //box = box3d_to_box2df(box3d); -//lwnotice("box3d made box2d(%.15g %.15g,%.15g %.15g)",box->xmin,box->ymin,box->xmax,box->ymax); - //memcpy(&result,box, sizeof(BOX2DFLOAT4)); - //lwfree(box); - - lwfree(box3d); - - return result; -} - // returns a pointer to internal storage, or NULL // if the serialized form does not have a BBOX. BOX2DFLOAT4 * diff --git a/lwgeom/lwgeom_estimate.c b/lwgeom/lwgeom_estimate.c index 33a11d0fa..25364c9d0 100644 --- a/lwgeom/lwgeom_estimate.c +++ b/lwgeom/lwgeom_estimate.c @@ -1897,7 +1897,6 @@ Datum LWGEOM_estimated_extent(PG_FUNCTION_ARGS) char *nsp; char *tbl; char *col; - LWHISTOGRAM2D *histo; ArrayType *array = NULL; int SPIcode; SPITupleTable *tuptable; @@ -2007,6 +2006,9 @@ Datum LWGEOM_estimated_extent(PG_FUNCTION_ARGS) /********************************************************************** * $Log$ + * Revision 1.14 2004/12/13 12:25:27 strk + * Removed obsoleted function and fixed some warnings. + * * Revision 1.13 2004/12/10 12:35:11 strk * implemented estimated_extent() function * -- 2.50.1