UNSUBSCRIBE

Craig Nakamoto craig.nakamoto at CLAERO.COM
Thu Apr 28 15:39:24 EDT 2005


 

-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Bart van den Eijnden
Sent: Thursday, April 28, 2005 1:26 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] Trouble getting SLD working

Hi Rod,

I can't see anything obvious wrong with what you are doing.

A few questions:

-is your WMS GetCapabilities working?

-does the LAYER work without an SLD, ie when you specify a CLASS?

-does it work if you leave out the style parameter in the request?

-your WMS request is not a full WMS request, it should contain a BBOX,
WIDTH, HEIGHT and SRS (among others). But Mapserver seems to be leniant
towards this and probably uses MAP file values.

Best regards,
Bart

On Thu, 28 Apr 2005 14:00:44 -0500, Rod Suddaby <rsuddaby at NRCAN.GC.CA>
wrote:

> Hi List:
> I'm a newbie to SLD and I've been trying to figure out why my build of
> mapserver will not apply the styles. I've created the following SLD
xml
> file:
>
> [test_sld.xml]
> <StyledLayerDescriptor version="1.0.0"
xmlns="http://www.opengis.net/sld"
> xmlns:gml="http://www.opengis.net/gml"
xmlns:ogc="http://www.opengis.net/
> ogc" xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.
> org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://www.opengis.net/sld
>
http://schemas.opengeospatial.net/sld/1.0.0/StyledLayerDescriptor.xsd">
>  <NamedLayer>
>    <Name>provinces</Name>
>      <UserStyle>
>        <Name>myStyle</Name>
>          <FeatureTypeStyle>
>            <Rule>
>              <PolygonSymbolizer>
>                 <Fill>
>                   <CssParameter name="fill">#00ff00</CssParameter>
>                 </Fill>
>                 <Stroke>
>                   <CssParameter name="stroke">#0000ff</CssParameter>
>                   <CssParameter name="stroke-width">3</CssParameter>
>                 </Stroke>
>               </PolygonSymbolizer>
>            </Rule>
>         </FeatureTypeStyle>
>      </UserStyle>
>     </NamedLayer>
> </StyledLayerDescriptor>
>
> The layer block of my mapfile is:
>
> LAYER
>   NAME provinces
>   DATA prov_prj
>   PROJECTION
>     "init=epsg:42304"
>   END
>   UNITS METERS
>   TYPE POLYGON
>   STATUS ON
>
> # CLASS
> #   COLOR 255 0 0
> #   OUTLINECOLOR 0 0 255
> # END
>
> END
>
>
> I've sent the following request to the mapserver:
> http://localhost/cgi-bin/mapserv?map=prov.map&version=1.1.
>
1&request=getMap&layers=provinces&styles=&sld=http://localhost/test_sld.
xml
>
> ... and all I get is a blank image. Checking the apache access_log
shows
> no
> hit for the 'test_sld.xml' file. It seems that mapserver is simply
> ignoring
> the sld parameter.
> I've also tried putting the "wms_sld_url" tag in the layer metadata,
> tried
> the "wms_sld_body" tag, and tried feeding the xml directly using the
> sld_body parameter -- same result
>
> Heres the output of mapserv -v:
>
> %dragon>./mapserv -v
> MapServer version 4.4.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBNP
> SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER
SUPPORTS=WMS_CLIENT
> SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT INPUT=TIFF INPUT=EPPL7
> INPUT=POSTGIS
> INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
>
> O.S. Is Suse Linux 9.1
>
> Can anyone see if I'm missing something here?
> Also, are there any other resources available regarding SLD other than
> the
> spec and the HOWTO docs?
>
> Thanks,
> Rod.
>



--
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/



More information about the mapserver-users mailing list