[mapserver-users] Problems labelling using Halo option

Yewondwossen Assefa yassefa at dmsolutions.ca
Thu Sep 30 04:24:21 PDT 2010


  Hi there,

  Is the sld xml you are using valid?  Grabbing it from this e-mail, It 
seems to not validate (several <PropertyName>  tags). It might just a 
copy paste but make sure of that.
You can aslo set your map in debug mode ( DEBUG 5 for example) and check 
your logs to see if the xml was parsed properly and if that is the case 
you should also be able a tmp file of your map file after SLD was applied

regards,


On 30/09/2010 3:34 AM, David Alda Fernandez de Lezea wrote:
> Hi list,
>
> I'm developing a program that generates some images from a WMS with a dynamic generated SLD. The problem is that I'm telling MapServer to generate some labels with Halo, to make them easy to read, using the following code:
>
> <NamedLayer>
> <Name>vinedos</Name>
> <UserStyle><Name></Name><Title></Title><Abstract></Abstract>
> <FeatureTypeStyle>
> <Rule>
> <Filter>
> <And>
> <PropertyIsEqualTo><PropertyName>provincia</PropertyName><Literal>1</Literal></PropertyIsEqualTo>
> <PropertyIsEqualTo><PropertyName>municipio</PropertyName><Literal>43</Literal></PropertyIsEqualTo>
> <PropertyIsEqualTo><PropertyName>poligono</PropertyName><Literal>4</Literal></PropertyIsEqualTo>
> <PropertyIsEqualTo><PropertyName>parcela</PropertyName><Literal>880</Literal></PropertyIsEqualTo>
> <PropertyIsEqualTo><PropertyName>recinto</PropertyName><Literal>1</Literal></PropertyIsEqualTo>
> </And>
> </Filter>
> <PolygonSymbolizer>
> <Stroke>
> <CssParameter name="stroke">#000000</CssParameter>
> <CssParameter name="stroke-width">2</CssParameter>
> <CssParameter name="stroke-dasharray">5 5 5 5</CssParameter>
> </Stroke>
> </PolygonSymbolizer>
> <TextSymbolizer>
> <Label>
> <PropertyName>poligono</PropertyName>-<PropertyName>parcela</PropertyName>-<PropertyName>recinto</PropertyName>
> </Label>
> <Font>
> <CssParameter name="font-family">times</CssParameter>
> <CssParameter name="font-size">18</CssParameter>
> <CssParameter name="font-weight">bold</CssParameter>
> </Font>
> <LabelPlacement>
> <PointPlacement>
> <AnchorPoint><AnchorPointX>0.5</AnchorPointX><AnchorPointY>0.5</AnchorPointY>
> </AnchorPoint>
> </PointPlacement>
> </LabelPlacement>
> <Halo>
> <Radius>
> <Literal>2</Literal>
> </Radius>
> <Fill>
> <CssParameter name="fill">#FFFFFF</CssParameter>
> <CssParameter name="fill-opacity">0.85</CssParameter>
> </Fill>
> </Halo>
> <Fill>
> <CssParameter name="fill">#000000</CssParameter>
> <CssParameter name="fill-opacity">0.65</CssParameter>
> </Fill>
> </TextSymbolizer>
> </Rule>
> </FeatureTypeStyle>
> </UserStyle>
> </NamedLayer>
>
> But when I receive the image the Halo is not applied (see attached file). My mapfile is as follows:
>
> NAME "WMSSERVER"
> 		
> 		STATUS ON
> 		EXTENT 460000 4710000 610000 4820000 # Euskadi		
> 		SHAPEPATH "extra/shapes/"
> 		FONTSET "extra/fonts/fonts.txt"
> 		SYMBOLSET "extra/symbols/symbols.sym"
> 		
> 		
> 		IMAGETYPE "image/png; mode=24bit"
>
> 		OUTPUTFORMAT
> 		   NAME png
> 		   DRIVER "AGG/PNG"
> 		   MIMETYPE "image/png"
> 		   IMAGEMODE RGBA
> 		   EXTENSION "png"
> 		   FORMATOPTION "TRANSPARENT=ON"
> 		   FORMATOPTION "INTERLACE=OFF"
> 		END
> 		OUTPUTFORMAT
> 		  NAME jpeg
> 		  DRIVER "GD/JPEG"
> 		  MIMETYPE "image/jpeg"
> 		  IMAGEMODE RGB
> 		  EXTENSION "jpg"
> 		END
> 		IMAGECOLOR 255 255 255
> 		UNITS METERS
> 		
> 		DEBUG ON
> 		CONFIG "MS_ERRORFILE" "C:/ms4w/Apache/htdocs/ogcservices/logs/wms_impresiones_lotes_log.log"
> 		DEBUG 5
>
>
> 	WEB
> 		IMAGEPATH "C:/ms4w/Apache/htdocs/ogcservices/tmp/"
> 		IMAGEURL "tmp/"
> 		METADATA
> 			"wms_name"            	"IKT WMS Server"
> 			"wms_title"           	"Servidor WMS IKT - Impresiones Lotes"
> 			"wms_onlineresource"  	"http://192.168.1.161/cgi-bin/mapserv.exe?map=../htdocs/ogcservices/impresiones_lotes_wms.map&"
> 			"wms_srs"       		"EPSG:23030 EPSG:4326"
> 			"wms_transparent"       "true"
> 			"wms_abstract"		"Servicio de mapas WMS de IKT Nekazal Teknologia. Powered by Apache and UMN MapServer. Servicio WMS para las impresiones por lotes."
> 			"wms_keywordlist"		"IKT,Euskadi,Mapas Euskadi"
> 			"wms_feature_info_mime_type"   "application/vnd.ogc.gml"
> 			"labelcache_map_edge_buffer" "-10"
> 		END
> 	END
> 	
> 	PROJECTION
> 		"init=epsg:23030"
> 	END
>
> 	LAYER
> 		STATUS ON
> 		CONNECTIONTYPE postgis
> 		CONNECTION "user=postgres password=1111 dbname=VITICOLA_IMPRESIONES host=192.168.1.161 port=5432"
> 		NAME "vinedos"
>
> 		PROJECTION
> 			"init=epsg:23030"
> 		END
> 		DUMP TRUE
> 		TYPE POLYGON
> 		METADATA
> 			"wms_title"			  "vinedos"
> 			"wms_srs"             "EPSG:23030"
> 			"wms_name"            "vinedos"
> 			"wms_server_version"  "1.1.1"
> 			"wms_format"          "image/gif"
> 			"wms_transparent"     "true"
> 			"wms_extent"		  "470000 4700000 610000 4820000"
> 			"gml_include_items"	  "all"
> 		END	
> 		#Sentencia SQL para obtener los datos
> 		DATA "the_geom FROM vinedos using unique gid using SRID=23030"
>
> 		CLASS
> 			NAME "Vinedos"
> 			STYLE
> 				SYMBOL 'dashed1'
> 				OUTLINECOLOR 0 0 0
> 			END
> 			TEMPLATE "ttt_query.html"
> 		END
> 		
> 		PROCESSING "LABEL_NO_CLIP=ON"
> 	END
>
> END
>
> And my font file:
>
> sans                    Vera.ttf
> esri-130                esri_130.ttf
> times				times.ttf
> times-bold			timesbd.ttf
> arial				arial.ttf
>
> No error messages are received.
>
> Any ideas??
>
> Thanks.
>
> Un saludo,
>
> ··················································································
>
> David Alda Fernández de Lezea
> Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y Biodiversidad
>
> IKT
> Granja Modelo s/n · 01192 · Arkaute (Araba)
>
> ··················································································
> Tlfnos.: 945-00-32-95                         Fax: 945-00.32.90
> ··················································································
> email: dalda at ikt.es                                web: www.ikt.es
> ··················································································
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users


-- 
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst

Email: yassefa at dmsolutions.ca
http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925
----------------------------------------------------------------


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20100930/9995bcf7/attachment.htm>


More information about the MapServer-users mailing list