Opened 14 years ago

Closed 14 years ago

#3398 closed defect (fixed)

WMS GetLegendGraphic and keyimage size

Reported by: assefa Owned by: assefa
Priority: normal Milestone: 6.0 release
Component: WMS Server Version: unspecified
Severity: normal Keywords: getlegendgraphic imagesize
Cc: jt@…, dmorissette, mko, lars@…

Description

e-mail from the list (Jörg Thomsen jt at mapmedia.de)

since an update from mapserver 4.x to 5.6 we have a problem with the keyimage of rasterlayers. The keyimage is unusually large, but with the old version it worked.

the original imagine is 451*1949 px the keysize in the mapfile is given with

KEYSIZE 450 1950

The image which is now delivered has a size of 472*1960px, most of this picture is white canvas, the original graphic is very small and placed at the lower left corner.

Any suggestions?

I found an older post meanwhile, so I am not the only one having this problem: http://lists.osgeo.org/pipermail/mapserver-users/2009-December/063947.html

Regards, Jörg

Attachments (1)

maplegend.c.3398.zip (719 bytes ) - added by assefa 14 years ago.
patch against 5.6 branch

Download all attachments as: .zip

Change History (11)

comment:1 by assefa, 14 years ago

Cc: jt@… added
Owner: changed from mapserverbugs to assefa

checking if I can reproduce ...

comment:2 by dmorissette, 14 years ago

Cc: dmorissette added

comment:3 by assefa, 14 years ago

committed in trunk r9986.

I will attach the patch against 5.6: Jörg could you please build with it and make sure you get what you expect. I do not have 4.x to compare with but the patch seems to scale the images to what I am expecting. Please confirm that this works for you and I will patch 5.6.

Thanks

by assefa, 14 years ago

Attachment: maplegend.c.3398.zip added

patch against 5.6 branch

comment:4 by mko, 14 years ago

Cc: mko added

comment:6 by assefa, 14 years ago

I tested with a keyimage using you 5.4.2 output. I added a fix (r10013) and I was able to produce a legend using the paramters:

  • KEYSIZE 549 1960 (in the legend)
  • keyimage "./images/ms542.png"

comment:7 by gislars, 14 years ago

That looks much better. Great! The legend is big enough to be read. Although there is still a difference between 5.4.2 and current trunk You can use the above links, I just updated "mssvn" (the last one)

comment:8 by assefa, 14 years ago

I see a bit of differences too. It may be related to work done #2917. I think It is in acceptable shape right now? If you agree I will back-port this change to 5.6.

comment:9 by gislars, 14 years ago

I'm fine with it. Thanks for your help.

comment:10 by assefa, 14 years ago

Resolution: fixed
Status: newclosed

committed in 5.6 branch r10015

Note: See TracTickets for help on using tickets.