[mapserver-users] Arrowhead in Mapserver 6.0

thomas bonfort thomas.bonfort at gmail.com
Fri May 6 01:58:51 PDT 2011


vector symbols are ill-defined by nature in mapserver, especially if
you are using negative values and single points like you are.

more precisely, you should *never* use
-99 -99
x y
-99 -99
as in that case you are drawing a line with a single point which will
be rightfully discarded by cairo and agg, whereas gd will render a
single pixel.

A vector symbol that should work should be

POINTS
0 0
1 0.5
0 1
END

But I would strongly recommend that you use a truetype symbol for arrowheads:

SYMBOL
  TYPE TRUETYPE
  FONT sans
  CHARACTER '>'
  NAME "to"
END

SYMBOL
  TYPE TRUETYPE
  FONT sans
  CHARACTER '<'
  NAME "from"
END

regards,
thomas

On Fri, May 6, 2011 at 06:59, Makoto Niwa <niwa at orkney.co.jp> wrote:
> Hi,list
>
> I tried new MapServer 6.0(rc2).
>
> I got diffrent images GD/PNG and CAIRO renderes for arrowhead symbols.
>
> Attached images are
> ms6_gd.gif : render by GD/GIF
> ms6_aggpng8.png : render by AGG/PNG
>
> CAIRO renderer image is as same as AGG.
> CARIO/AGG renderer has incorrect ofsset for arrowhead symbols.
> I used vcetor type symbols for arrowhead symbols.
>
> But I got same results both AGG and GD in MapSever 5.6
>
> Is this behavior correct in MapServer 6 ?
>
> regards,
>
> makoto.
>
> ---------------------------------------------------
> Symbol definition:
>  SYMBOL
>    NAME "from"
>    TYPE vector
>    POINTS
>      0 10
>      -20 0
>      0 -10
>      -99 -99
>      -40 10
>      -99 -99
>      -40 -10
>    END
>  END
>
>  SYMBOL
>    NAME "to"
>    TYPE vector
>    POINTS
>      0 10
>      20 0
>      0 -10
>      -99 -99
>      40 10
>      -99 -99
>      40 -10
>    END
>  END
>
> Style in the layer:
>      STYLE
>        ANGLE AUTO
>        GEOMTRANSFORM "start"
>        SYMBOL "from"
>        COLOR 255 20 20
>        WIDTH 2
>      END
>      STYLE
>        ANGLE AUTO
>        GEOMTRANSFORM "end"
>        SYMBOL "to"
>        COLOR 20 20 255
>        WIDTH 2
>      END
>
> ---------------------------------------------------
> Makoto Niwa Orkney,Inc.
> Queen's Tower C 12F
> 2-3-5 Minatomirai, Nishi, Yokohama, Japan
> TEL.81-45-228-3320  FAX.81-45-228-3321
> E-mail niwa at orkney.co.jp http://www.orkney.co.jp
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>



More information about the MapServer-users mailing list