cast to integer in image coordinates
The output-svg module casts point coordinates to integers, when outputing
results in full resolution (and conversion to image coordinates).
This is a drawback because resolution is lost (e.g. when you want to zoom the
map later). Furthermore, the lines are poorly antialiased this way.
I looked into the code and it seems that the right way is already there, but
commented. Is there any reason for that?
Here follows the relevant code:
/* full resolution, pixel output */
if (bFullRes && !bUseGeoCoord)
{
if(shape->type == MS_SHAPE_LINE || shape->type == MS_SHAPE_POLYGON)
{
for(i=0; i<shape->numlines; i++)
{
for(j=0; j < shape->line[i].numpoints; j++ )
{
/*
shape->line[i].point[j].x =
(shape->line[i].point[j].x - extent.minx)/cellsize;
shape->line[i].point[j].y =
(extent.maxy - shape->line[i].point[j].y)/cellsize;
*/
shape->line[i].point[j].x =
MS_MAP2IMAGE_X(shape->line[i].point[j].x,
extent.minx,
cellsize);
shape->line[i].point[j].y = MS_MAP2IMAGE_Y(
shape->line[i].point[j].y,
extent.maxy,
cellsize);
}
}
return;
}
}
Change History
(12)
Resolution: |
→ fixed
|
Status: |
new → closed
|
Milestone: |
→ 5.4 release
|
Resolution: |
fixed
|
Status: |
closed → reopened
|
Owner: |
changed from mapserverbugs to assefa
|
Status: |
reopened → new
|
Resolution: |
→ fixed
|
Status: |
assigned → closed
|
There is no cure for the symptone in this part of the mapserver code. I tried to compile mapserver, SVN as of today, 2008-09-15 with both variants, the original one and the one commented out, and there is no significant visual difference, files attached, look at them at 500%. Anyway, I did not try to find where the correct fix should belong, maybe someone knows, where the path coordinates are aligned with the grid.