[mapserver-dev] Question on SVG symbol sizes

thomas bonfort thomas.bonfort at gmail.com
Wed Mar 14 11:20:24 PDT 2012


Steve,
I haven't experimented with svg symbols extensively. I did add some
autotests that use scaling and rotating, and it would seem to work:

http://trac.osgeo.org/mapserver/browser/trunk/msautotest/renderers/point_svg.map
http://trac.osgeo.org/mapserver/browser/trunk/msautotest/renderers/expected/point_svg.png.png

ps: looking at the link you sent, the symbols seem correct to me. is
this still an issue ?

--
thomas

On Wed, Mar 14, 2012 at 17:04, Stephen Woodbridge
<woodbri at swoodbridge.com> 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