Opened 18 years ago

Last modified 13 years ago

#1019 assigned defect

support legend graphic generation for WMS layers

Reported by: pspencer@… Owned by: mapserverbugs
Priority: normal Milestone: 6.0 release
Component: WMS Client Version: 4.3
Severity: trivial Keywords:
Cc: debbie.pagurek@…, tomkralidis, sholl, nhermann

Description (last modified by dmorissette)

When mapserver acts as a WMS client, it does not use the legendurl metadata to generate legend icons. It would be very nice if mapserver would be able to generate legend icons for remote WMS layers from the legendurl metadata. An acceptable limitation would be to require all the metadata that is created when loading a context file. The intention would be to have legend icons show up in both the mapserver legend and the legend template processor output.

Change History (14)

comment:1 by dmorissette, 18 years ago

Milestone: 4.4 release
Status: newassigned
Let's see if this can be done in 4.4 with a trivial change to the legend
generation code, otherwise we may have to push to a later release. (Assefa will
have a look)

Note that anything we do for this should not be limited to HTML legends and
should also apply to the GIF legend, and by the same way to the GetLegendGraphic
call when cascading WMS layers.

comment:2 by assefa, 18 years ago

For wms layers, we should alaways have 2 metadatas at the layer level for the 
legend icnon to be generated :
  - "wms_style" "sytle_name" 
  - "wms_style_<style_name>_legendurl_href " "http..."

We should not think about automatically using a GetLegendGraphic request 
becase we do not know at that point if the server supports such a request. 

Applications could setup the legendurl_href metadata to a GetlegendGraphic if 
that is possible. 

Thinking about it the current GetlegendGraphic in Mapserver supports the RULE 
paramater (to select the class) and returns an icon, anf if no RULE is 
specified it returns all the classes with the labels. I think we should have 
the possiblity to return an icon for the first class without spcifying a RULE 
if there is someting like ONLY_FISRT_ICON (or something) specified in the 
request. I think Cubewerx uses this kind of solution. This will make it easier 
for applications to generate the GetLgenedGraphic url (since they do not have 
to do a GetStyles request and parse it to extract the rule name)


comment:3 by dmorissette, 18 years ago

Is there a way that this url to get a single icon when no rule is specified can
be advertized in capabilities? Keep in mind that you cannot just craft this url
in the WMS client (unless you go back to capabilities, etc.): the legend graphic
url has to come from capabilities.

comment:4 by assefa, 18 years ago

Cc: tom.kralidis@… added
I don't see how this can be advertized in the capabilities 

We can still support the wms_style ans wms_style_<name>_legnedurl_href and leave
the application the task of setting the value properly after doing a getStyles
on the layer. Paul is this acceptable ?

I have added Tom in cc since his opinion on this can be valuable. 
 

comment:5 by tomkralidis, 18 years ago

I agree w/ Assefa.  We should stay away from WMS Client automatically generating
the GetLegenGraphic, and use whatever is in "wms_legendurl_href", which may or
may not be a GetLegendGraphic request URL.

comment:6 by pagurekd@…, 18 years ago

Cc: pagurekd@… added

comment:7 by dmorissette, 15 years ago

Description: modified (diff)
Milestone: 5.0 release5.2 release

comment:8 by dmorissette, 15 years ago

Description: modified (diff)

comment:9 by dmorissette, 15 years ago

Cc: tomkralidis added

comment:10 by dmorissette, 15 years ago

Cc: sholl added

comment:11 by tomkralidis, 15 years ago

Cc: debbie.pagurek@… added; pagurekd@… removed

So, the addition here would be:

  • add support for "wms_style_<style_name>_legendurl_href " "http...": when a GetFeatureInfo request is made to a layer which is a remote WMS

Questions:

  • what if this is defined for a local layer? Should it override the default behaviour or ignore (i.e. we specify this only applies to remote WMS layers in a mapfile)?
  • when doing the remote request, do we simply do an HTTP Location redirect, or do we actually perform the request, swallow the response and return to the client? Note that we do the former for SOS DescribeSensor requests

comment:12 by nhermann, 15 years ago

Cc: nhermann added

comment:13 by dmorissette, 14 years ago

Milestone: 5.2 release5.4 release

comment:14 by dmorissette, 13 years ago

Milestone: 5.4 release6.0 release
Note: See TracTickets for help on using tickets.