Permalink
Browse files

Layer GeomTransform should be applied in nextShape and GetShape

  • Loading branch information...
1 parent 2993658 commit 4701b0a9cc4d07b0378e3f19f0b51d66d3d12022 Alan Boudreault committed Feb 19, 2013
Showing with 22 additions and 9 deletions.
  1. +0 −5 mapdraw.c
  2. +22 −4 maplayer.c
View
@@ -1044,11 +1044,6 @@ int msDrawVectorLayer(mapObj *map, layerObj *layer, imageObj *image)
if (layer->type == MS_LAYER_LINE && msLayerGetProcessingKey(layer, "POLYLINE_NO_CLIP")) {
drawmode |= MS_DRAWMODE_UNCLIPPEDLINES;
}
-
- /* Apply GeomTransform */
- if(layer->_geomtransform.type != MS_GEOMTRANSFORM_NONE) {
- msGeomTransformShape(map, layer, &shape);
- }
if (cache) {
styleObj *pStyle = layer->class[shape.classindex]->styles[0];
View
@@ -258,8 +258,10 @@ int msLayerWhichShapes(layerObj *layer, rectObj rect, int isQuery)
*/
int msLayerNextShape(layerObj *layer, shapeObj *shape)
{
+ int rv;
+
if ( ! layer->vtable) {
- int rv = msInitializeVirtualTable(layer);
+ rv = msInitializeVirtualTable(layer);
if (rv != MS_SUCCESS)
return rv;
}
@@ -271,7 +273,14 @@ 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 */
- return layer->vtable->LayerNextShape(layer, shape);
+ rv = layer->vtable->LayerNextShape(layer, shape);
+
+ /* RFC89 Apply Layer GeomTransform */
+ if(layer->_geomtransform.type != MS_GEOMTRANSFORM_NONE && rv == MS_SUCCESS) {
+ rv = msGeomTransformShape(layer->map, layer, shape);
+ }
+
+ return rv;
}
/*
@@ -295,8 +304,10 @@ int msLayerNextShape(layerObj *layer, shapeObj *shape)
*/
int msLayerGetShape(layerObj *layer, shapeObj *shape, resultObj *record)
{
+ int rv;
+
if( ! layer->vtable) {
- int rv = msInitializeVirtualTable(layer);
+ rv = msInitializeVirtualTable(layer);
if(rv != MS_SUCCESS)
return rv;
}
@@ -306,7 +317,14 @@ int msLayerGetShape(layerObj *layer, shapeObj *shape, resultObj *record)
** tagged on to the main attributes with the naming scheme [join name].[item name].
*/
- return layer->vtable->LayerGetShape(layer, shape, record);
+ rv = layer->vtable->LayerGetShape(layer, shape, record);
+
+ /* RFC89 Apply Layer GeomTransform */
+ if(layer->_geomtransform.type != MS_GEOMTRANSFORM_NONE && rv == MS_SUCCESS) {
+ rv = msGeomTransformShape(layer->map, layer, shape);
+ }
+
+ return rv;
}
/*

0 comments on commit 4701b0a

Please sign in to comment.