Permalink
Browse files

Fixed a bug (see #5157) where converting points from pixel to image c…

…oordinates with the shpxy tag was happening twice.
  • Loading branch information...
sdlime committed Sep 1, 2015
1 parent 901499d commit aad6de36da54d7ae9a77f8b820a200ec3ae012e6
Showing with 1 addition and 6 deletions.
  1. +1 −6 maptemplate.c
View
@@ -1951,13 +1951,11 @@ static int processShpxyTag(layerObj *layer, char **line, shapeObj *shape)
double scale_x, scale_y;
-
char *projectionString=NULL;
shapeObj tShape;
char *coords=NULL, point[128];
-
if(!*line) {
msSetError(MS_WEBERR, "Invalid line pointer.", "processShpxyTag()");
return(MS_FAILURE);
@@ -2059,7 +2057,6 @@ static int processShpxyTag(layerObj *layer, char **line, shapeObj *shape)
if(argValue)
if(strcasecmp(argValue,"true") == 0) centroid = MS_TRUE;
-
argValue = msLookupHashTable(tagArgs, "proj");
if(argValue) projectionString = argValue;
}
@@ -2121,9 +2118,7 @@ static int processShpxyTag(layerObj *layer, char **line, shapeObj *shape)
switch(tShape.type) {
case(MS_SHAPE_POINT):
- /* at this point we only convert the first point of the first shape */
- tShape.line[0].point[0].x = MS_MAP2IMAGE_X(tShape.line[0].point[0].x, layer->map->extent.minx, layer->map->cellsize);
- tShape.line[0].point[0].y = MS_MAP2IMAGE_Y(tShape.line[0].point[0].y, layer->map->extent.maxy, layer->map->cellsize);
+ /* no clipping necessary */
break;
case(MS_SHAPE_LINE):
msClipPolylineRect(&tShape, layer->map->extent);

0 comments on commit aad6de3

Please sign in to comment.