Skip to content

Commit

Permalink
Revert "make msLayerNextShape calculate shape bounds (#4391)"
Browse files Browse the repository at this point in the history
This reverts commit f3554df.
  • Loading branch information
tbonfort committed Jul 17, 2012
1 parent 7599b8c commit af9f398
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
14 changes: 4 additions & 10 deletions maplayer.c
Expand Up @@ -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;
}
Expand All @@ -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);
}

/*
Expand All @@ -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;
}
Expand All @@ -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);
}

/*
Expand Down
2 changes: 2 additions & 0 deletions mappostgis.c
Expand Up @@ -2198,6 +2198,8 @@ int msPostGISReadShape(layerObj *layer, shapeObj *shape)
}

shape->numvalues = layer->numitems;

msComputeBounds(shape);
}

if( layer->debug > 2 ) {
Expand Down
1 change: 1 addition & 0 deletions mapuvraster.c
Expand Up @@ -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]);
Expand Down

0 comments on commit af9f398

Please sign in to comment.