[mapserver-dev] Question on SVG symbol sizes

Stephen Woodbridge woodbri at swoodbridge.com
Wed Mar 14 10:59:12 PDT 2012


I have resized the svg images in inkscape to be the size I want, so they 
display ok in the url below, but it seems that there is something about 
svg files and their interaction with mapsever that I do not understand. 
I created a simple circle filed with white and a black outline in 
inkscape and it scales based on the MINSIZE and MAXSIZE values. But the 
US shield required me resizing the svg image. So I suspect that there is 
something in the svg file the controls this. When I use "image" above I 
am referring to the .svg file.

Does this ring a bell with anyone?
Is anyone else trying out the svg symbols?
I would be happy to share experiences.

-Steve W

On 3/14/2012 12:04 PM, Stephen Woodbridge wrote:
> Hi SVG devs,
>
> I have a question on SVG symbols in mapserver and how do you change the
> size of the rendered symbol.
>
> For example I have an SVG symbol for a US hwy shield that was built
> 600x600 pixels.
>
> I want it to render 20x20 pixels in my map image output. I have a LAYER
> definition like the following. I just added a patch to #4247 to get this
> to render at all, but the symbol is rendered very large.
>
> http://imaptools.com:8080/cgi-bin/mapserv-6.1-dev?MAP=%2Fu%2Fdata%2Ftiger2011-maps%2Ftiger2011-tmp.map&FORMAT=image%2Fpng&MAP_IMAGETYPE=agg_qn&LAYERS=Tiger_2011&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A900913&BBOX=-10485490.899012,3960784.0007718,-10057443.551356,4297106.9167874&WIDTH=700&HEIGHT=550
>
>
> Since this is a lot of new code all getting dumped into trunk, I don't
> know if I am looking at a bug or user error or what?
>
> Any thoughts on this?
>
> Thanks,
> -SteveW
>
> LAYER
> NAME "roads"
> TYPE LINE
> TILEINDEX "tidx-ROADS"
> MAXSCALEDENOM 500000
> CLASSITEM "RTTYP"
> LABELITEM "FULLNAME"
> SIZEUNITS METERS # zoom dependent scaling
> CLASS
> CLASS
> EXPRESSION /^[USC]/
> STYLE
> COLOR "#FFFB89"
> WIDTH 18
> OUTLINECOLOR "#ECD390"
> OUTLINEWIDTH 1
> END
> LABEL
> MAXSCALEDENOM 200000
> EXPRESSION ('[RTTYP]' = 'U' && '[RTENUM]' ~ '.')
> TEXT '[RTENUM]'
> STYLE
> #GEOMTRANSFORM 'labelpnt'
> SYMBOL "U"
> SIZE 20
> MINSIZE 20 # override zoom dependent scaling
> MAXSIZE 20
> END
> SIZE TINY
> POSITION CC
> #OFFSET 1 0
> MINDISTANCE 100
> COLOR "#000000"
> PARTIALS FALSE
> PRIORITY 7
> END
> END
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev



More information about the mapserver-dev mailing list