[MAPSERVER-USERS] SLD not working
Bart van den Eijnden (OSGIS)
bartvde at osgis.nl
Wed Feb 13 21:54:13 PST 2008
Don't use quotes around the SLD URL.
&SLD=http://10.1.15.68/sfmaps/sld/sfgis_shoreext.xml
Best regards,
Bart
--
Bart van den Eijnden
OSGIS, Open Source GIS
http://www.osgis.nl
--------- Oorspronkelijk bericht --------
Van: Paul McCullough <Paul.McCullough at sfgov.org>
Naar: mapserver-users at lists.osgeo.org <mapserver-users at lists.osgeo.org>
Onderwerp: [MAPSERVER-USERS] SLD not working
Datum: 13/02/08 23:16
>
> All,
>
> I am new to map server and I cannot get an SLD to work.
> I found posts similar to mine - none helped.
> The SLD works fine in geoserver so I suspect my mapserver config (3 days
> old).
>
> Here is my URL on one line:
>
http://10.1.15.68/cgi-bin/mapserv.exe?map=/ms4w/maps/map.map&LAYERS=shore_extent&UNITS=dd&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&FORMAT=image%2Fjpeg&SRS=EPSG%3A4326&BBOX=-122.42699980800003,37.752500096,-122.36449971200004,37.815000192&WIDTH=256&HEIGHT=256&PROJECTION=EPSG%3A4326&SLD="http://10.1.15.68/sfmaps/sld/sfgis_shoreext.xml"&
>
> Here is my URL formatted nicely for your inspection:
> http://10.1.15.68/cgi-bin/mapserv.exe
> ?map=/ms4w/maps/map.map
> &LAYERS=shore_extent
> &UNITS=dd
> &SERVICE=WMS
> &VERSION=1.1.1
> &REQUEST=GetMap
> &STYLES=
> &FORMAT=image%2Fjpeg
> &SRS=EPSG%3A4326
>
&BBOX=-122.42699980800003,37.752500096,-122.36449971200004,37.815000192
> &WIDTH=256
> &HEIGHT=256
> &PROJECTION=EPSG%3A4326
> &SLD="http://10.1.15.68/sfmaps/sld/sfgis_shoreext.xml"
> &
>
> Here is my map file:
> MAP
> IMAGECOLOR 180 180 250
> IMAGETYPE PNG24
> UNITS DD
> WEB
> IMAGEPATH "/tmp/"
> IMAGEURL "tmp/"
> METADATA
> "wms_title" "a wms title"
> "wms_srs" "EPSG:4326"
> END
> END
> PROJECTION
> "init=EPSG:4326"
> END
> LAYER
> NAME "shore_extent"
> DEBUG ON
> GROUP "Selected"
> CONNECTIONTYPE postgis
> CONNECTION "user=postgres password=postgres dbname=postgis
host=localhost
> port=5432"
> DATA "the_geom from shoreext"
> TYPE POLYGON
> STATUS DEFAULT
> PROJECTION
> "init=EPSG:102643"
> END
> CLASS
> NAME 'Shore Extent'
> METADATA
> "wms_sld_body" "AUTO"
> END
> # I have tried this style section commented in and out
> STYLE
> OUTLINECOLOR 100 100 100
> COLOR 200 200 200
> END
> END
> END
> END
>
> Here is the SLD
> <?xml version="1.0" encoding="UTF-8"?>
> <sld:StyledLayerDescriptor
xmlns:sld="http://www.opengis.net/sld"
> xmlns:ogc="http://www.opengis.net/ogc"
> xmlns:gml="http://www.opengis.net/gml"
version="1.0.0">
> <sld:UserLayer>
> <sld:LayerFeatureConstraints>
> <sld:FeatureTypeConstraint/>
> </sld:LayerFeatureConstraints>
> <sld:UserStyle>
> <sld:Name>Default Styler</sld:Name>
> <sld:Title>Default Styler</sld:Title>
> <sld:Abstract/>
> <sld:FeatureTypeStyle>
> <sld:Name>simple</sld:Name>
> <sld:Title>title</sld:Title>
> <sld:Abstract>abstract</sld:Abstract>
>
<sld:FeatureTypeName>shoreext</sld:FeatureTypeName>
>
>
<sld:SemanticTypeIdentifier>generic:geometry</sld:SemanticTypeIdentifier>
> <sld:Rule>
> <sld:Name>name</sld:Name>
> <sld:Title>title</sld:Title>
> <sld:Abstract>Abstract</sld:Abstract>
> <sld:PolygonSymbolizer>
> <sld:Fill>
> <sld:CssParameter name="fill">
>
<ogc:Literal>#EBE6DC</ogc:Literal>
> </sld:CssParameter>
> <sld:CssParameter
name="fill-opacity">
> <ogc:Literal>1.0</ogc:Literal>
> </sld:CssParameter>
> </sld:Fill>
> </sld:PolygonSymbolizer>
> </sld:Rule>
> </sld:FeatureTypeStyle>
> </sld:UserStyle>
> </sld:UserLayer>
> </sld:StyledLayerDescriptor>
>
> Here is my httpd.conf file:
> http://www.nabble.com/file/p15471896/httpd.conf httpd.conf
>
>
> I am on
> - windows xp sp 2.
> - Apache 2.2 (installed separately)
> - ms4w (cgi-bin hooked up "manually")
>
> I can get the map file style to work but not the SLD.
> I am obviously missing something.
> I would have tried, without success, to put this into the map file.
> And have read some inconclusive discussion about server side SLD.
> I have read about how mapserver does not implement all SLD idioms and
played
> around with my SLD.
> All suggestions welcome.
>
> Regards,
> Paul
>
> --
> View this message in context:
http://www.nabble.com/SLD-not-working-tp15471896p15471896.html
> Sent from the Mapserver - User mailing list archive at Nabble.com.
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
More information about the MapServer-users
mailing list