[mapserver-users] Symbols for railroad rendering in svg

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


Seems to work fine:

http://maps.camavision.com/map/jasperia?LAYERS=railroad&TRANSPARENT=TRUE&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&FORMAT=svg&SRS=EPSG%3A3857&BBOX=-10383282.7081,5105096.2257452,-10333332.7081,5127296.2257452&WIDTH=1998&HEIGHT=888

-Andy


On 11/18/2016 05:36 PM, TMa Teng wrote:
> Thanks for sharing your method.
>
> However that is still brush line for the railway symbol which is not supported when using SVG format, isn’t it? Could you verify if a wms getmap call which contains the railway layer and in the getmap request set the output format=SVG to see if that works at your side?
>
> Thanks again,
> Teng
>
> -----Original Message-----
> From: Andy Colson [mailto:andy at squeakycode.net]
> Sent: Friday, November 18, 2016 5:52 PM
> To: mapserver-users at lists.osgeo.org; TMa Teng <TMa at edrnet.com>
> Subject: Re: [mapserver-users] Symbols for railroad rendering in svg
>
> 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