[Mapserver-users] Point symbol rendering problem (in GD?)

Havard Tveite havard.tveite at ikf.nlh.no
Fri Apr 4 01:19:53 PST 2003


I have tested the symbol functionality of the development
version of Mapserver, and have had some problems with the
rendering of filled vector symbols.
Rendering with an outline gives the expected results, while
rendering without an outline gives "unexpected" results.

Problem:
When there is a horizontal line making up a lower border
of a filled area of the symbol, one row of pixels will be
missing along this line. (a line that is at the complete
bottom of the symbol is rendered OK). For a horizontal
line making up ab upper border, there is no problem.

The "error" seems so come from the "YX" algorithm used in
"gdImageFilledPolygon", and should have nothing to do with
mapserver.
I am using GD 2.0.12 now, but the problem was there also
before I upgraded.

Example:

Using the symbol
   SYMBOL
     NAME "vplus"
     TYPE vector
     FILLED true
     POINTS
       1 0  2 0  2 1  3 1  3 2  2 2  2 3  1 3  1 2  0 2  0 1  1 1  1 0
     END
   END

Produces the following

Symbol size 3, no outline:

  XX
XXXX
  XX
  XX

Symbol size 3, with outline:

  XX
XXXX
XXXX
  XX

Symbol size 7:

   XXXX
   XXXX
XXXXXXXX
XXXXXXXX
XXXXXXXX
   XXXX
   XXXX
   XXXX

   XXXX
   XXXX
XXXXXXXX
XXXXXXXX
XXXXXXXX
XXXXXXXX
   XXXX
   XXXX

I have also tested this for vector boxes with holes, and
the same problem appears.

A work around is to always render filled vector symbols
with an outline.

-- 
Håvard Tveite                       Phone:  +47 64948857
Department of Mapping Sciences      Fax:    +47 64948856
Agricultural University of Norway  http://www.nlh.no/ikf
Hogskoleveien 14, POBox 5034, N-1432 Ås, NORWAY




More information about the MapServer-users mailing list