WG: [Gvsig_english] gvsig_wms_sld

Buchholz, Robert Robert.Buchholz at LUA.Brandenburg.de
Thu Mar 6 12:46:08 CET 2008


 Thanks a lot to Jose and Jaume,

your reply was of help.
Just to give additional information. There is a web-based-client to Mapserver(Chameleon: Example->OGC Widgets)
http://chameleon.maptools.org/index.phtml
 that supports syling of WMS.

All the best,
Robert

-----Ursprüngliche Nachricht-----
Von: gvsig_internacional-bounces at runas.cap.gva.es [mailto:gvsig_internacional-bounces at runas.cap.gva.es] Im Auftrag von José Vicente
Gesendet: Donnerstag, 6. März 2008 11:47
An: gvsig_internacional at runas.cap.gva.es
Cc: Buchholz, Robert
Betreff: Re: [Gvsig_english] gvsig_wms_sld

El Wednesday 05 March 2008 17:03:52 Buchholz, Robert escribió:
> Dear gvSIG list,
>
> my first posting:
> Does gvSIG support SLD according to WMS 1.1.1 Spec (supports optional
> GetStyles- Request)?
No, it doesn't (at the moment). The only SLD 1.0 request implemented by gvSIG is getLegendGraphic. 
>
> I.E. ->Add WMS layer:
> 
>http://localhost:8080/cgi-bin/mapserv.exe?VERSION=1.1.1&SERVICE=WMS&REQ
>UEST 
>=GetMap&SRS=EPSG:25833&BBOX=3240000,5670000,3484000,5950000&WIDTH=450&H
>EIGHT 
>=300&FORMAT=image/png&Layers=mylayer&map=C:/ms4w/apps/chameleon/samples
>/map/ world_wms.map&SLD=http://localhost:8080/mapserv_sld.xml
>
> I want to offer several sld.xml to allow extern users to display 
> layers in different colours, width of borderline,...
I've seen that you use mapserver so you can do it. You can define two mapfiles, in the first one you must define a WMSCLIENT with several SLD legends and you must define the datasources (shapes, postgis, ...) in the second one. For example:

* wms.base (you will have to connect to this one):

LAYER
      NAME "cascade"
        DEBUG ON
      TYPE RASTER        
CONNECTION "http://localhost/cgi-bin/mapserv?map=/home/jvhigon/pruebas/wms_cascade/wms_base.map"
        CONNECTIONTYPE WMS
        METADATA
            "wms_srs"             "EPSG:23030"
            "wms_name"            "shp_polygon"
            "wms_server_version"  "1.1.1"
            "wms_format"          "image/png"
                "wms_style"        "default"
                "wms_style_default_sld"  "http://localhost/apache2-default/prueba.xml"
            "wms_style_default_legendurl_height" "20"
            "wms_style_default_legendurl_href" "http://localhost/cgi-bin/mapserv?map=/home/jvhigon/pruebas/wms_cascade/wms_base.map&REQUEST=GetLegendGraphic&SERVICE=WMS&VERSION=1.1.1&LAYER=shp_polygon&FORMAT=image/png&SLD=http://localhost/apache2-default/prueba.xml"
            "wms_style_default_legendurl_format" "image/png"
            "wms_style_default_legendurl_width"  "20"
	#you can define more styles than default !!
  END
   END # Layer

* wms_base.map (is used by the wms.map)

LAYER
      NAME "shp_polygon"
      TYPE POLYGON    		  
      DATA "shp_polygon.shp"      
      PROJECTION
         "init=epsg:23030"
      END
 [ ...]

* prueba.xml (the sld for the default style) <?xml version="1.0" encoding="UTF-8"?> <StyledLayerDescriptor version="1.0.0" > <NamedLayer>
        <Name>shp_polygon</Name>
        <UserStyle>
                <Name>default</Name>
                <FeatureTypeStyle>
                        <Rule>
                                <Name>default</Name>
                                <PolygonSymbolizer>
                                        <Fill>
                                        <CssParameter name="fill" 
>#FF0000</CssParameter>
                                        </Fill>
                                </PolygonSymbolizer>
                        </Rule>
                </FeatureTypeStyle>
</UserStyle>
</NamedLayer>

I hope it is useful for you. Best regards.

>
> Thanks for ideas and and any help in advance, Robert
> -----------------------------------------
> Robert Buchholz
> Sachbearbeiter (Trainee)
> Referat GIS-Zentrale
> Seeburger Chaussee 2
> Landesumweltamt Brandenburg
> Postanschrift: 14476 Potsdam
> Besucheranschrift: Seeburger Chaussee 2, 14476 Potsdam
> Mail: Robert.Buchholz at LUA.Brandenburg.de
> Internet: http://www.brandenburg.de/lua Kein Zugang für elektronisch 
> signierte sowie für verschlüsselte elektronische Daten. 
> -----------------------------------------
>
> _______________________________________________
> Gvsig_internacional mailing list
> Gvsig_internacional at runas.cap.gva.es
> http://runas.cap.gva.es/mailman/listinfo/gvsig_internacional



--
José Vicente Higón Valero
Grupo desarrollo gvSIG. 
IVER TI S.A. 
C/Salamanca, 50-52 46005-Valencia
Tlf.+34963163400
http://www.iver.es
http://www.gvsig.com
http://www.gvsig.gva.es

Este mensaje y sus archivos son confidenciales. No está permitida su reproducción o distribución sin la autorización expresa de "IVER Tecnologías de la Información". Si usted no es el destinatario previsto, queda desautorizado cualquier uso, acceso o copia de este mensaje. Si ha recibido este mensaje por error, por favor bórrelo e infórmenos por esta misma vía.



_______________________________________________
Gvsig_internacional mailing list
Gvsig_internacional at runas.cap.gva.es
http://runas.cap.gva.es/mailman/listinfo/gvsig_internacional



More information about the Gvsig_internacional mailing list