[Mapserver-users] WMS style elements and SLD

Rene Teniere TENIERER at gov.ns.ca
Fri Apr 16 05:34:08 PDT 2004


I agree, a mapfile example would be great, especially where wms_sld_url
comes in. Am I under the correct assumption that if you use SLD you do
not need a class style in the mapfile? As for the 4.1 version, I feel
that anything that is more OGC compliant is a great thing, however, it's
good to know the changes and what is available. Saves a lot of
headaches. I had the same problem with the layers, bbox, etc. issues in
the getmap. I am using PHP/MapScript and would like to marry that with
the SLD WMS functionality for more OGC compliance, therefore I don't
think the GetMap request would be an option. It would be nice for SLD to
work straight through the mapfile. BTW, I get confused a lot because I
use server AND client mapfiles for WMS. Would be nice to have examples
of both.

Rene

>>> "uli" <uli.mueller at gmx.ch> 2004-04-16 9:15:52 AM >>>
>found it helpful. I have just performed a GetMap request to test it,
and
>the style did not come through.

I face the same problem (even after I realized that I had to upgrade
from MS
4.0.1 to 4.1 ;)
Maybe someone from DMSolutions could supplement the SLD documentation
(http://www2.dmsolutions.ca/tmp/Mapserver_SLD.html) with example
mapfiles
for the WMS client and server part? Would be extremely helful!

BTW: with MS 4.1 it seems to be obligatory to specify LAYERS in the
URL,
whereas in 4.0, the WMS server returned some default layers, if no
layers
were specified in the URL. Is this a bug or a step towards more OGC
compliance? Personally, I liked the 4.0-way.

Thank you, Uli

>
>Rene
>
>>>> Yewondwossen Assefa <assefa at dmsolutions.ca> 2004-04-15 4:44:18 PM
>>>>
>The NamedStyle is not supported in mapserver currently. (Only User
>defined styles are supported) It refers to a possiblity to draw a
layer
>
>using a predfined name. For example the same road data can be drawn
>using a style called "theamtic" for tourist maps or "Regular" for
>another type of maps. In mapserver world, It would mean having one(or
>several) classes defining the thematic style, and one (or several)
>classes for the Regular style. The styles would me butally exclusive.
>The user can then selects through the sld which style to use for
>drawing
>tha layer. This does not yet exists in Mapserver.
>
>  Using wms_sld_url should be enough for using the sld with a server.
>You can also refer to
>http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?SLDMapServer for more
>infos.
>
>Later,
>
>Rene Teniere wrote:
>
>> Assefa,
>>
>> Thanks, It's all so confusing. I have seen so many variations on
how
>to
>> do this, and am especially wondering what the NamedStyle refers to.
>Does
>> it use the style element in the mapfile, or does it have to be
>created?
>> In the OGC SLD reference it shows the NamedLayer, and NamedStyle,
but
>I
>> do not know where the NamedStyle comes from or how it is created.
If
>I
>> use wms_sld_url, do I still have to use wms_style or wms_stylelist?
>As
>> you can see I have a lot of questions and I'm sorry for the volume
as
>I
>> know SLD is new to MapServer.
>>
>> Rene
>>
>>
>>>>>Yewondwossen Assefa <assefa at dmsolutions.ca> 2004-04-15 2:21:52 PM
>>>>>
>>
>> Rene,
>>
>>   You should use  the wms_sld_url metadata. So in your case you
would
>
>> have "wms_sld_url" "http://10.2.185.9/wms/basewms_sld.xml".
>>   Note also that there is the wms_sld_body metedata that can be set
>to
>>
>> the actual contect of the sld document.
>>
>> Best Regards,
>>
>
>
>--
>----------------------------------------------------------------
>Assefa Yewondwossen
>Software Analyst
>
>Email: assefa at dmsolutions.ca 
>http://www.dmsolutions.ca/ 
>
>Phone: (613) 565-5056 (ext 14)
>Fax:   (613) 565-0925
>----------------------------------------------------------------
>
>
>_______________________________________________
>Mapserver-users mailing list
>Mapserver-users at lists.gis.umn.edu 
>http://lists.gis.umn.edu/mailman/listinfo/mapserver-users 
>




More information about the MapServer-users mailing list