Skip to content
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 1882b7c commit c8f813d43e0e08699d207572cab3a7312b831dc6
Showing 1 changed file with 1 addition and 5 deletions.
@@ -1948,13 +1948,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()");
@@ -2118,9 +2116,7 @@ static int processShpxyTag(layerObj *layer, char **line, shapeObj *shape)

switch(tShape.type) {
/* 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 */
msClipPolylineRect(&tShape, layer->map->extent);

0 comments on commit c8f813d

Please sign in to comment.