Ticket #1019 (assigned defect)

Opened 4 years ago

Last modified 2 months ago

support legend graphic generation for WMS layers

Reported by: pspencer@dmsolutions.ca Assigned to: mapserverbugs (accepted)
Priority: normal Milestone: 5.4 release
Component: WMS Client Version: 4.3
Severity: trivial Keywords:
Cc: debbie.pagurek@ec.gc.ca, 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

11/01/04 14:23:19 changed by dmorissette

  • status changed from new to assigned.
  • milestone set to 4.4 release.
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.

11/02/04 12:19:15 changed by assefa

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)


11/02/04 12:59:26 changed by dmorissette

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.

11/02/04 15:01:33 changed by assefa

  • cc set to tom.kralidis@ec.gc.ca.
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. 
 

11/02/04 17:47:33 changed by tomkralidis

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.

11/10/04 14:33:39 changed by pagurekd@agr.gc.ca

  • cc set to pagurekd@agr.gc.ca.

08/16/07 08:33:30 changed by dmorissette

  • description changed.
  • milestone changed from 5.0 release to 5.2 release.

08/16/07 08:34:19 changed by dmorissette

  • description changed.

09/14/07 09:38:36 changed by dmorissette

  • cc changed from pagurekd@agr.gc.ca to pagurekd@agr.gc.ca, tomkralidis.

09/14/07 09:45:14 changed by dmorissette

  • cc changed from pagurekd@agr.gc.ca, tomkralidis to pagurekd@agr.gc.ca, tomkralidis, sholl.

09/14/07 10:33:06 changed by tomkralidis

  • cc changed from pagurekd@agr.gc.ca, tomkralidis, sholl to debbie.pagurek@ec.gc.ca, tomkralidis, sholl.

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

09/16/07 08:11:35 changed by nhermann

  • cc changed from debbie.pagurek@ec.gc.ca, tomkralidis, sholl to debbie.pagurek@ec.gc.ca, tomkralidis, sholl, nhermann.

07/07/08 12:15:02 changed by dmorissette

  • milestone changed from 5.2 release to 5.4 release.