#719 closed defect (fixed)
Rotated maps - embedded scalebar is incorrect
Reported by: | dmorissette | Owned by: | warmerdam |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | MapServer C Library | Version: | 4.3 |
Severity: | normal | Keywords: | |
Cc: | richard@… |
Description
Richard Barahona wrote: > Hello Frank, > I have attached two pdf files (scale 1:1000) created from your > application, one with no rotation and the second with an angle of 30°. > The graphic scalebar of the latter pdf is not correctly calculated > (see lower left). Only tested with the ANGLE parameter in mapfile. > Is it a big effort to fix it? > I quickly checked the code and I see that msDrawScalebar() does the following: --- map->cellsize = msAdjustExtent(&(map->extent), map->width, map->height); status = msCalculateScale(map->extent, map->units, map->width, map->height, map->resolution, &map->scale); --- If this is called during a map draw then it will calculate the scale based on the extents after rotation.
Change History (5)
comment:2 by , 20 years ago
Richard uses an EMBEDded scalebar, and I believe he uses PHP MapScript but that shouldn't matter. I forwarded you a new copy of his sample map showing the problem. msEmbedScalebar() is called twice from msDrawMap()... (twice? that's odd... unfortunately I got to run now and can't check that further)
comment:4 by , 20 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I have committed a change to mapdraw.c to temporarily restore the original extents (with proper scale) before calling msEmbedScalebar(). This seems to resolve the problem. I have also updated the msautotest/gdal/rot_out.map test to include and embedded scalebar so we will know if this breaks in the future.
comment:5 by , 20 years ago
Cc: | added |
---|
Note:
See TracTickets
for help on using tickets.