MapTools.org

[Chameleon] dataurl question

Debbie Pagurek pagurekd@agr.gc.ca
Tue, 02 Dec 2003 10:30:09 -0500
This is a MIME message. If you are reading this text, you may want to 
consider changing to a mail reader or gateway that understands how to 
properly handle MIME multipart messages.

--=_3F61C114.F899DF6A
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hi Paul,
thanks for your reply.
So I played around with a context document, one created from CWC.  I
modified it (see below) and added a dataURL tag so that I could try to
point to a URL for a legend.  Then I uploaded this context document into
CWC but unfortunately it doesn't seem to fill in that dataURL box when I
click on the layer in the legend.

Oh well, I guess I'm going to have to be patient and wait for legend
support, unless someone has another suggestion.

Thanks,
Debbie

<Layer queryable=3D"1" hidden=3D"0">
      <Server service=3D"WMS" version=3D"1.1.0" title=3D"Soil Order
(dominant)">
        <OnlineResource xlink:type=3D"simple"
xlink:href=3D"http://wms1.agr.gc.ca/cgi-bin/soil/ns/pockwock?"/>
      </Server>
      <Name>order_dom</Name>
      <Title>Soil Order (dominant)</Title>
      <Abstract>The dominant Soil Order recorded for the soil components
in the polygon.</Abstract>
      <SRS>EPSG:42304 EPSG:42101 EPSG:4269 EPSG:4326 EPSG:4267
latlong</SRS>
      <FormatList>
        <Format current=3D"1">image/gif</Format>
        <Format>image/png</Format>
        <Format>image/jpeg</Format>
        <Format>image/wbmp</Format>
        <Format>text/html</Format>
        <Format>image/tiff</Format>
      </FormatList>
 <dataURL>
   <OnlineResource xlink:type=3D"simple" xlink:href=3D"
http://wms1.agr.gc.ca/cgi-bin/soil/ns/pockwock?mode=3Dlegend&layer=3Dorder_=
dom"/>
 </dataURL>=20
      <StyleList>
      </StyleList>
    </Layer>

>>> pagameba@magma.ca 12/01/03 10:30AM >>>
Debbie,

you raise a good issue relating to legends and how MapServer handles (or

doesn't) handle them.

I just checked with Assefa and there is no support in MapServer for=20
DataURL via metadata.  By this, I mean that setting a metadata item for=20
wms_dataurl will not result in the dataurl appearing in either the WMS=20
capabilities.  What is a bit confusing is that it is handled in Context=20
documents (or at least it should be).  By this, I mean that when you=20
load a context file, mapserver will create a wms_dataurl metadata (if=20
necessary), and when you save a context, it should read the wms_dataurl=20
metadata and include it in the context.  It is not clear to me if this=20
is not working for you, or if you are trying to get it to work with the=20
WMS server (which it won't yet).

As an aside, you mentioned that this is a work around :)  The SLD=20
support being added into MapServer WMS will include GetLegendGraphic=20
requests as well.  How this will be implemented is not yet clear to me,=20
but I am expecting that legend graphic url information will be=20
propogated to the WMS capabilities document will include a=20
GetLegendGraphic request.  This may be driven by metadata, or=20
automatically generated, or a combination of the two.

I would also like to see WMS client support for this in MapServer, so=20
that if you are working with WMS layers in a mapfile (as is the case=20
with CWC2), you could use the standard MapServer legend functionality=20
and it would trigger a call to get the graphic associated with a WMS=20
layer (as defined from capabilities or context), this would have to be=20
driven by metadata.  There is already a preliminary implementation of=20
this for legend icon information coming from contexts, I believe the=20
metadata entry ends up being four space separated values as in: "<mime=20
type> <width> <height> <url>"

Supporting legend graphics doesn't seem to be too difficult, but there=20
are many issues surrounding it because of the interconnection between=20
the various specs, including WMC, WMS, and SLD (getting a legend graphic

should take into account any applied SLD).  There is also an issue with=20
classes on layers, I don't know how that is handled (but I think there=20
is a way).

Cheers,

Paul


Debbie Pagurek wrote:

> Hi all,
> I'm using a CWC installation, and am trying to work around the ongoing
> legend issue.  I notice that when you add a wms layer to CWC, and you
> click on the layer link, it opens up a box that shows "dataURL".  I
> would lik
e to try to use this for my legend url, by putting a
mapserver
> mode=3Dlegend url in there, as in:
>
http://wms1.agr.gc.ca/cgi-bin/soil/ns/pockwock?mode=3Dlegend&layer=3Dkind_d=
om
>=20
> Question is, where do I put this data url in the mapfile so that it
> will appear in the CWC dataURL part?  I tried to put it in the
metadata
> section of the layer under "wms_dataurl" but that doesn't seem to
work?
>=20
> Can anyone help?
> Debbie Pagurek
>=20
> Debbie Pagurek, M.Sc.
> GIS and Remote Sensing Analyst / T=E9l=E9d=E9tection, SIG
> Research Branch / D.G. Recherche
> Agriculture and Agri-Food Canada / Agriculture et Agroalimentaire
> Canada
> Telephone / T=E9l=E9phone: 613-759-1543
> Facsimile / T=E9l=E9copieur: 613-759-1937
> 960 Carling Avenue
> Ottawa, Ontario
> K1A 0C6
> pagurekd@agr.gc.ca
>=20
> _______________________________________________
> Chameleon mailing list
> Chameleon@lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
>=20

--=20
  -----------------------------------------------------------------
|Paul Spencer                           spencer@dmsolutions.ca    |
|-----------------------------------------------------------------|
|Applications & Software Development                              |
|DM Solutions Group Inc                 http://www.dmsolutions.ca/|
  -----------------------------------------------------------------

--=_3F61C114.F899DF6A
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Content-Description: HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1276" name=GENERATOR></HEAD>
<BODY style="MARGIN-TOP: 2px; FONT: 8pt Tahoma; MARGIN-LEFT: 2px">
<DIV>Hi Paul,</DIV>
<DIV>thanks for your reply.</DIV>
<DIV>So I played around with a context document, one created from CWC.&nbsp; I 
modified it (see below) and added a dataURL tag so that I could try to point to 
a URL for a legend.&nbsp; Then I uploaded this context document into CWC but 
unfortunately it doesn't seem to fill in that dataURL box when I click on the 
layer in the legend.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Oh well, I guess I'm going to have to be patient and wait for legend 
support, unless someone has another suggestion.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks,</DIV>
<DIV>Debbie</DIV>
<DIV>&nbsp;</DIV>
<DIV>&lt;Layer queryable="1" hidden="0"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&lt;Server service="WMS" version="1.1.0" title="Soil Order 
(dominant)"&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;OnlineResource 
xlink:type="simple" xlink:href="<A 
href='http://wms1.agr.gc.ca/cgi-bin/soil/ns/pockwock?"/'>http://wms1.agr.gc.ca/cgi-bin/soil/ns/pockwock?"/</A>&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&lt;/Server&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&lt;Name&gt;order_dom&lt;/Name&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&lt;Title&gt;Soil Order 
(dominant)&lt;/Title&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Abstract&gt;The 
dominant Soil Order recorded for the soil components in the 
polygon.&lt;/Abstract&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&lt;SRS&gt;EPSG:42304 EPSG:42101 EPSG:4269 EPSG:4326 EPSG:4267 
latlong&lt;/SRS&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&lt;FormatList&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Format 
current="1"&gt;image/gif&lt;/Format&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&lt;Format&gt;image/png&lt;/Format&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&lt;Format&gt;image/jpeg&lt;/Format&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&lt;Format&gt;image/wbmp&lt;/Format&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&lt;Format&gt;text/html&lt;/Format&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&lt;Format&gt;image/tiff&lt;/Format&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&lt;/FormatList&gt;<BR>&nbsp;&lt;dataURL&gt;<BR>&nbsp;&nbsp; &lt;OnlineResource 
xlink:type="simple" xlink:href=" <A 
href='http://wms1.agr.gc.ca/cgi-bin/soil/ns/pockwock?mode=legend&amp;layer=order_dom"/'>http://wms1.agr.gc.ca/cgi-bin/soil/ns/pockwock?mode=legend&amp;layer=order_dom"/</A>&gt;<BR>&nbsp;&lt;/dataURL&gt; 
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&lt;StyleList&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&lt;/StyleList&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;/Layer&gt;<BR><BR>&gt;&gt;&gt; 
pagameba@magma.ca 12/01/03 10:30AM &gt;&gt;&gt;<BR>Debbie,<BR><BR>you raise a 
good issue relating to legends and how MapServer handles (or <BR>doesn't) handle 
them.<BR><BR>I just checked with Assefa and there is no support in MapServer for 
<BR>DataURL via metadata.&nbsp; By this, I mean that setting a metadata item for 
<BR>wms_dataurl will not result in the dataurl appearing in either the WMS 
<BR>capabilities.&nbsp; What is a bit confusing is that it is handled in Context 
<BR>documents (or at least it should be).&nbsp; By this, I mean that when you 
<BR>load a context file, mapserver will create a wms_dataurl metadata (if 
<BR>necessary), and when you save a context, it should read the wms_dataurl 
<BR>metadata and include it in the context.&nbsp; It is not clear to me if this 
<BR>is not working for you, or if you are trying to get it to work with the 
<BR>WMS server (which it won't yet).<BR><BR>As an aside, you mentioned that this 
is a work around :)&nbsp; The SLD <BR>support being added into MapServer WMS 
will include GetLegendGraphic <BR>requests as well.&nbsp; How this will be 
implemented is not yet clear to me, <BR>but I am expecting that legend graphic 
url information will be <BR>propogated to the WMS capabilities document will 
include a <BR>GetLegendGraphic request.&nbsp; This may be driven by metadata, or 
<BR>automatically generated, or a combination of the two.<BR><BR>I would also 
like to see WMS client support for this in MapServer, so <BR>that if you are 
working with WMS layers in a mapfile (as is the case <BR>with CWC2), you could 
use the standard MapServer legend functionality <BR>and it would trigger a call 
to get the graphic associated with a WMS <BR>layer (as defined from capabilities 
or context), this would have to be <BR>driven by metadata.&nbsp; There is 
already a preliminary implementation of <BR>this for legend icon information 
coming from contexts, I believe the <BR>metadata entry ends up being four space 
separated values as in: "&lt;mime <BR>type&gt; &lt;width&gt; &lt;height&gt; 
&lt;url&gt;"<BR><BR>Supporting legend graphics doesn't seem to be too difficult, 
but there <BR>are many issues surrounding it because of the interconnection 
between <BR>the various specs, including WMC, WMS, and SLD (getting a legend 
graphic <BR>should take into account any applied SLD).&nbsp; There is also an 
issue with <BR>classes on layers, I don't know how that is handled (but I think 
there <BR>is a way).<BR><BR>Cheers,<BR><BR>Paul<BR><BR><BR>Debbie Pagurek 
wrote:<BR><BR>&gt; Hi all,<BR>&gt; I'm using a CWC installation, and am trying 
to work around the ongoing<BR>&gt; legend issue.&nbsp; I notice that when you 
add a wms layer to CWC, and you<BR>&gt; click on the layer link, it opens up a 
box that shows "dataURL".&nbsp; I<BR>&gt; would like to try to use this for my 
legend url, by putting a mapserver<BR>&gt; mode=legend url in there, as 
in:<BR>&gt; <A 
href="http://wms1.agr.gc.ca/cgi-bin/soil/ns/pockwock?mode=legend&amp;layer=kind_dom">http://wms1.agr.gc.ca/cgi-bin/soil/ns/pockwock?mode=legend&amp;layer=kind_dom</A><BR>&gt; 
<BR>&gt; Question is, where do I put this data url in the mapfile so that 
it<BR>&gt; will appear in the CWC dataURL part?&nbsp; I tried to put it in the 
metadata<BR>&gt; section of the layer under "wms_dataurl" but that doesn't seem 
to work?<BR>&gt; <BR>&gt; Can anyone help?<BR>&gt; Debbie Pagurek<BR>&gt; 
<BR>&gt; Debbie Pagurek, M.Sc.<BR>&gt; GIS and Remote Sensing Analyst / 
Télédétection, SIG<BR>&gt; Research Branch / D.G. Recherche<BR>&gt; Agriculture 
and Agri-Food Canada / Agriculture et Agroalimentaire<BR>&gt; Canada<BR>&gt; 
Telephone / Téléphone: 613-759-1543<BR>&gt; Facsimile / Télécopieur: 
613-759-1937<BR>&gt; 960 Carling Avenue<BR>&gt; Ottawa, Ontario<BR>&gt; K1A 
0C6<BR>&gt; pagurekd@agr.gc.ca<BR>&gt; <BR>&gt; 
_______________________________________________<BR>&gt; Chameleon mailing 
list<BR>&gt; Chameleon@lists.maptools.org<BR>&gt; <A 
href="http://lists.maptools.org/mailman/listinfo/chameleon">http://lists.maptools.org/mailman/listinfo/chameleon</A><BR>&gt; 
<BR><BR>-- <BR>&nbsp; 
-----------------------------------------------------------------<BR>|Paul 
Spencer&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
spencer@dmsolutions.ca&nbsp;&nbsp;&nbsp; 
|<BR>|-----------------------------------------------------------------|<BR>|Applications 
&amp; Software 
Development&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
|<BR>|DM Solutions Group 
Inc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
<A href="http://www.dmsolutions.ca/|">http://www.dmsolutions.ca/|</A><BR>&nbsp; 
-----------------------------------------------------------------<BR><BR><BR></DIV></BODY></HTML>

--=_3F61C114.F899DF6A--


This archive was generated by Pipermail.