[mapserver-users] Symbols for railroad rendering in svg

Andy Colson andy at squeakycode.net
Fri Nov 18 14:51:30 PST 2016


On 11/18/2016 2:22 PM, TMa Teng wrote:
> Hi all,
>
> I am working on a project to export the wms to SVG format, it is the from the requirement of the features to be in vector format. And I am facing trouble to use the render engine to render the railroad symbol as a brush line.
>
> RailRoad Symbol I am using is as follow:
>
> 	CLASS
> 		NAME "MD_Railroad"
>
> 		STYLE
> 		   SYMBOL "line_solid"
> 		   SIZE 2
> 		   COLOR 0 0 0
> 		END
> 		STYLE
> 		   SYMBOL "tie"
> 		   SIZE 6
> 		   COLOR 0 0 0
> 		   GAP -10
> 		END
> 	END
>
> It works as expect when the return image in raster format such as PNG, but when using SVG it shows error:
>
> "msDrawLineSymbol(): Renderer error. renderer does not support brushed lines"
>
> Does anyone have any suggestion about how to design a vector-enabled symbol for railways please? I am using MapServer 7.0, data is in SQL Server Spatial.
>
> Best regards,
>
> Teng
> 	
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>

Without seeing the "tie" symbol, its hard to say if mine is different. 
Here's how I draw mine:

SYMBOL
	NAME "railway"
	TYPE truetype
	FONT "Vera"
	CHARACTER "|"
END

CLASS
	NAME 'Railroad'
	STYLE
		SYMBOL 0
		COLOR 0 0 0
		SIZE 1
	END
	STYLE
		SYMBOL 'railway'
		COLOR 0 0 0
		SIZE 7
		GAP -10
	END
END

-Andy




More information about the MapServer-users mailing list