Opened 14 years ago

Last modified 14 years ago

#3546 new defect

Getlegendgraphic with sizeunit METERS set does not work

Reported by: tenglich Owned by: assefa
Priority: normal Milestone: 5.6.5 release
Component: WMS Server Version: 5.6
Severity: normal Keywords:
Cc: sholl

Description

Hello,

we have got problems using the GetLegendGraphic-Request. If we use it requesting the layer explained below we get no symbol drawn into the image which is delivered. only the name of the layer was drawn.

We analized the issue and detect that this problem occours if the scalefactor which is used to draw the symbol is very small.

We create a fix which solve this problem. But the fix will disable the possibility that an symbol is drawn smaller than scalefactor = 1 in the legendgraphic and not using the size the symbol will have using the max-extent of the map.

Here is the Layer which does not work:



LAYER

   NAME           "mylayer"
   STATUS          ON
   TYPE            LINE
   TEMPLATE       "mytemplate.html"
   HEADER         "myheader.html"
   FOOTER         "myfooter.html"
   MINSCALEDENOM   0        
   MAXSCALEDENOM   165000     
   TOLERANCE       20
   TOLERANCEUNITS  METERS
   SIZEUNITS       METERS

   METADATA
      WMS_TITLE                  "mytitle"
      WMS_SRS                    "epsg:31467"
      WMS_FEATURE_INFO_MIME_TYPE "text/html"
      WMS_EXTENT                 "3457312.92 5753546.26 3467917 5764666.5"
   END

   PROJECTION
      "init=epsg:31467"
   END
   
   DATA "myshape.shp"
  
   CLASSITEM "objectid"

   CLASS
      NAME       "myclass"
      EXPRESSION /./
      STYLE
        SYMBOL 'circle'
        COLOR   144 50 207
        SIZE    7
      END
   END
   
END

Attachments (3)

diff_branch-5-6.diff (674 bytes ) - added by tenglich 14 years ago.
diff_trunk.diff (835 bytes ) - added by tenglich 14 years ago.
legend.png (794 bytes ) - added by tenglich 14 years ago.
Wrong Legend in Mapserver Version 5.7-dev

Download all attachments as: .zip

Change History (8)

by tenglich, 14 years ago

Attachment: diff_branch-5-6.diff added

by tenglich, 14 years ago

Attachment: diff_trunk.diff added

comment:1 by sholl, 14 years ago

Cc: sholl added

comment:2 by assefa, 14 years ago

Component: MapServer C LibraryWFS Client
Owner: changed from sdlime to assefa

comment:3 by assefa, 14 years ago

Component: WFS ClientWMS Server

comment:4 by assefa, 14 years ago

have you tried setting the minsize parameter to 1 in your style object and see if you get the symbol?

in reply to:  4 comment:5 by tenglich, 14 years ago

Replying to assefa:

have you tried setting the minsize parameter to 1 in your style object and see if you get the symbol?

Hello,

yes it works using the minsize parameter. but using it takes affect to the map as well, which is often not a good idea.

We also find another Bug in the Legend-Graphic using the Windows Build of 5.7-dev:

If we use the underlying Layer the different Icons of the different Classes are rendered in a wrong height.

{{{LAYER

NAME "mylayer" STATUS ON TYPE LINE TEMPLATE "query.html" HEADER "header.html" FOOTER "gfooter.html" TOLERANCE 20 TOLERANCEUNITS METERS #PIXELS SIZEUNITS METERS #PIXELS

METADATA

WMS_TITLE "mylayer" WMS_SRS "epsg:31467" WMS_FEATURE_INFO_MIME_TYPE "text/html" WMS_EXTENT "3457312.92 5753546.26 3478522.40 5775787.08"

END

PROJECTION

"init=epsg:31467"

END

DATA myshape.shp"

CLASSITEM "id"

CLASS

NAME "name1" EXPRESSION /./ MINSCALEDENOM 1 MAXSCALEDENOM 1400

STYLE

SYMBOL 'circle' COLOR 144 50 207 SIZE 7

END

END CLASS

NAME "name1" EXPRESSION /./ MINSCALEDENOM 1350 MAXSCALEDENOM 5000

STYLE

SYMBOL 'circle' COLOR 144 50 207 SIZE 27

END

END CLASS

NAME "name1" EXPRESSION /./ MINSCALEDENOM 4800 MAXSCALEDENOM 50000

STYLE

SYMBOL 'circle' COLOR 144 50 207 SIZE 57

END

END CLASS

NAME "name1" EXPRESSION /./ MINSCALEDENOM 48000 MAXSCALEDENOM 150000

STYLE

SYMBOL 'circle' COLOR 144 50 207 SIZE 77

END

END

END

}}}

by tenglich, 14 years ago

Attachment: legend.png added

Wrong Legend in Mapserver Version 5.7-dev

Note: See TracTickets for help on using tickets.