From af9f39866c3ad0f7d594cf58de989281dfd7694f Mon Sep 17 00:00:00 2001 From: Thomas Bonfort Date: Tue, 17 Jul 2012 10:19:19 +0200 Subject: [PATCH] Revert "make msLayerNextShape calculate shape bounds (#4391)" This reverts commit f3554dfa7d98d16bc7c3ef325c5e689f530a863c. --- maplayer.c | 14 ++++---------- mappostgis.c | 2 ++ mapuvraster.c | 1 + 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/maplayer.c b/maplayer.c index 803f899f25..49931b7e76 100644 --- a/maplayer.c +++ b/maplayer.c @@ -148,9 +148,8 @@ int msLayerWhichShapes(layerObj *layer, rectObj rect, int isQuery) */ int msLayerNextShape(layerObj *layer, shapeObj *shape) { - int rv; if ( ! layer->vtable) { - rv = msInitializeVirtualTable(layer); + int rv = msInitializeVirtualTable(layer); if (rv != MS_SUCCESS) return rv; } @@ -162,9 +161,7 @@ int msLayerNextShape(layerObj *layer, shapeObj *shape) /* tagged on to the main attributes with the naming scheme [join name].[item name]. */ /* We need to leverage the iteminfo (I think) at this point */ - rv = layer->vtable->LayerNextShape(layer, shape); - msComputeBounds(shape); - return rv; + return layer->vtable->LayerNextShape(layer, shape); } /* @@ -188,9 +185,8 @@ int msLayerNextShape(layerObj *layer, shapeObj *shape) */ int msLayerGetShape(layerObj *layer, shapeObj *shape, resultObj *record) { - int rv; if( ! layer->vtable) { - rv = msInitializeVirtualTable(layer); + int rv = msInitializeVirtualTable(layer); if(rv != MS_SUCCESS) return rv; } @@ -200,9 +196,7 @@ int msLayerGetShape(layerObj *layer, shapeObj *shape, resultObj *record) ** tagged on to the main attributes with the naming scheme [join name].[item name]. */ - rv = layer->vtable->LayerGetShape(layer, shape, record); - msComputeBounds(shape); - return rv; + return layer->vtable->LayerGetShape(layer, shape, record); } /* diff --git a/mappostgis.c b/mappostgis.c index 7d69b2f6f6..ab88061c4d 100644 --- a/mappostgis.c +++ b/mappostgis.c @@ -2198,6 +2198,8 @@ int msPostGISReadShape(layerObj *layer, shapeObj *shape) } shape->numvalues = layer->numitems; + + msComputeBounds(shape); } if( layer->debug > 2 ) { diff --git a/mapuvraster.c b/mapuvraster.c index 3d06c1df8f..ed5a5d0222 100644 --- a/mapuvraster.c +++ b/mapuvraster.c @@ -535,6 +535,7 @@ int msUVRASTERLayerGetShape(layerObj *layer, shapeObj *shape, resultObj *record) line.numpoints = 1; line.point = &point; msAddLine( shape, &line ); + msComputeBounds( shape ); shape->numvalues = layer->numitems; shape->values = msUVRASTERGetValues(layer, &uvlinfo->u[x][y], &uvlinfo->v[x][y]);