[mapserver-users] SLD Issue

Dash jimlug at co.clackamas.or.us
Wed Oct 14 11:24:01 PDT 2009


Oh man, as soon as you posted this message I realized a spelling mistake.  I
fixed the misspelled word and everything works great now.  Thanks.

Thanks


Yewondwossen Assefa wrote:
> 
> Dash wrote:
>> Hey folks,
>>
>> I am trying to work with SLD files and implement a basic change (polygon
>> color).  Currently we are using MapServer 5.0.  I've used the GetStyles
>> WMS
>> Feature to create my SLD.  Then I changed the CSSParameter to change the
>> polygon color.  However, this simple process does not work.  I'm thinking
>> that I'm missing something.  Could someone please help?
>>
>> MapFile
>> -------
>> WEB
>>   IMAGEPATH "/home/mapserv/tmp/"
>>   IMAGEURL "/tmp/"
>>   METADATA
>> 	"wms_title"				"CCTS WMS SIMP"
>> 	"wms_onlineresource"
>> "http://babylon/cgi-bin/mapserv?map=/home/mapserv/proj/taxmap/schlocator/ol/wms/schools.map&"
>> 	"wms_srs"				"EPSG:2913 EPSG:4326 EPSG:900913"
>> 	"wms_feature_info_mime_type"	"text/html"
>>   END
>> END
>>
>> LAYER
>>   NAME "citybdy"
>>   CONNECTIONTYPE postgis
>>   CONNECTION "user=postgres dbname=gis01 host=localhost"
>>   DATA "the_geom from citybdy"
>>   PROJECTION
>> 	"init=epsg:2913"
>>   END
>>   DUMP  TRUE		### Mainly used for GML implementation
>>   TEMPLATE citybdy.html
>>   METADATA
>> 	"wms_title" "City Boundary"
>> 	"wms_name" "wms_citybdy"
>> 	"wms_feature_info_mime_type" "text/html"
>> 	"wms_include_items"	"all"
>> 	#"wms_srs"		"EPSG:2913"
>> 	"gml_include_items" "all"
>> 	"wms_sld_url" "http://babylon/taxmap/schlocoator/ol/sld/citybdy.xml"
>> 	"wms_sld_body" "AUTO"
>>   END
>>   TYPE     POLYGON
>>   STATUS   ON
>>   CLASS
>>     NAME "City Boundary"
>>     EXPRESSION ([jur] != 5)
>>     LABEL
>>       ANTIALIAS FALSE
>>       #COLOR 225 225 225
>>       COLOR 255 170 0
>>       OUTLINECOLOR 0 0 0
>>       FONT gill_sans
>>       FORCE FALSE
>>       MAXSIZE 125
>>       MINSIZE 14
>>       MINDISTANCE 225
>>       PARTIALS FALSE
>>       #POSITION LL
>>       POSITION CC
>>       OFFSET 35 35
>>       TYPE TRUETYPE
>>       SIZE 16
>>     END
>>     STYLE
>>       COLOR 255 255 190
>>       WIDTH 1.75
>>     END
>>   END
>>   CLASS
>>     NAME "CLACKAMS CO."
>>     EXPRESSION ([jur] = 5)
>>     STYLE
>>       #OUTLINECOLOR 255 255 0
>>       WIDTH 1.75
>>     END
>>   END
>> END
>>
>> SLD - citybdy.xml
>> -------------
>> "http://www.w3.org/1999/xlink"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xsi:schemaLocation="http://www.opengis.net/sld
>> http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd">
>> <NamedLayer>
>> <Name>wms_citybdy</Name>
>> <UserStyle>
>> <FeatureTypeStyle>
>> <Rule>
>> <Name>CLACKAMS CO.</Name>
>> <ogc:Filter><ogc:PropertyIsEqualTo><ogc:PropertyName>jur</ogc:PropertyName><ogc:Literal>5</ogc:Literal></ogc:PropertyIsEqualTo></ogc:Filter>
>> <PolygonSymbolizer>
>> </PolygonSymbolizer>
>> </Rule>
>> <Rule>
>> <Name>City Boundary</Name>
>> <ogc:Filter><ogc:PropertyIsNotEqualTo><ogc:PropertyName>jur</ogc:PropertyName><ogc:Literal>5</ogc:Literal></ogc:PropertyIsNotEqualTo></ogc:Filter>
>> <PolygonSymbolizer>
>> <Fill>
>> <CssParameter name="fill">#ffffbe</CssParameter>
>> <CssParameter name="fill-opacity">1.00</CssParameter>
>> </Fill>
>> </PolygonSymbolizer>
>> </Rule>
>> </FeatureTypeStyle>
>> </UserStyle>
>> </NamedLayer>
>> </StyledLayerDescriptor>
>>
>> URL Call
>> --------
>> http://web5.co.clackamas.or.us/cgi-bin/mapserv?map=/home/mapserv/proj/taxmap/schlocator/ol/wms/schools.map&SERVICE=WMS&VERSION=1.0.0&REQUEST=GetMap&Layers=citybdy&STYLES=&SRS=EPSG:2913&BBOX=7590264.90194037,427582.691274959,7905234.73409235,685608.824958787&WIDTH=400&HEIGHT=300&FORMAT=image/png&SLD=http://web5.co.clackamas.or.us/taxmap/schlocoator/ol/sld/citybdy.xml
>>
>> Any help would be greatly appreciated.  Thanks...
>>   
> Hi There,
> 
>  Can you post the full sld file? I tried to access it through the url  
> http://web5.co.clackamas.or.us/taxmap/schlocoator/ol/sld/citybdy.xml but 
> It was not available. Just trying to see if it is a syntax error in the
> sld.
> 
> 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.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
> 

-- 
View this message in context: http://n2.nabble.com/SLD-Issue-tp3824130p3824606.html
Sent from the Mapserver - User mailing list archive at Nabble.com.



More information about the MapServer-users mailing list