[Mapserver-dev] Label rendering Mapserver 3.7 - problems
Havard Tveite
havard.tveite at ikf.nlh.no
Fri Feb 14 16:00:02 EST 2003
I have experienced some problems with label rendering for
cached labels.
I tried to inform the user-list some weeks ago (Thu, 23 Jan
2003 14:42:47 +0100), but I have so far not seen any replies.
The problem is that the label background and the lables are
not scaled correctly. If I include the label background
I can see that the label background is not the same size as
the label, and the there is also a misalignment on the left
end of the label.
I have tried to look at the source code, but there is a lot
of things going on inside msDrawLabelCacheGD (msGetLabelSize,
....., billboardGD, msDrawTextGD), gdImageStringFT, ....
I have not found out if the problem is with GD, Freetype or
Mapserver.
I guess there are others that have more experience with the
code out there.
Does anyone have an idea of what is going on?
Am I the only one having this problem?
Should I file this as a bug in Bugzilla?
My configuration is:
Mapserver 3.7, nightly 23. january.
(Solaris 2.5.1)
MapServer version 3.7 (development) OUTPUT=PNG OUTPUT=JPEG
OUTPUT=WBMP SUPPORTS=PROJ SUPPORTS=TTF SUPPORTS=WMS_SERVER
SUPPORTS=WMS_CLIENT SUPPORTS=GD2_RGB INPUT=EPPL7 INPUT=SDE
INPUT=POSTGIS INPUT=GDAL INPUT=SHAPEFILE
GDAL 1.1.8
GD 2.0.11
PostGIS 0.7.3
Freetype 2.1.2
You can see the output of one of my tests here (try to zooom in and out):
<URL: http://gis.nlh.no:8080/cgi-bin/mapserv_3.7?map=/home/ikf/ikfht/mapserv/o-kart/labeltest-37.map >
Everything seems work OK with bitmap fonts.
The mapfile producing this output:
*******************************************************
MAP
NAME labeltest
IMAGETYPE png # png24 gives the same results
SIZE 400 400
EXTENT 0 0 1000 1000
UNITS meters
FONTSET /home/www/lib/fonts/font.list
WEB
IMAGEPATH "/home/ikf/ikfht/pub_html/mapserver/tmp/"
IMAGEURL "/~ikfht/mapserver/tmp/"
TEMPLATE /home/ikf/ikfht/pub_html/mapserver/o-kart/labeltest.html
END #web
SYMBOL
NAME "circle"
TYPE ellipse
FILLED true
POINTS 1 1 END
END
LAYER
NAME fonttest
TYPE POINT
STATUS DEFAULT
LABELMINSCALE 1000 # This seems to have no effect on the label scaling
LABELMAXSCALE 100000 # This seems to have no effect on the label scaling
MINSCALE 500 # This seems to have no effect on the label scaling
SYMBOLSCALE 10000 # This has effect on label scaling
MAXSCALE 200000 # This seems to have no effect on the label scaling
FEATURE
POINTS 100 500 END
TEXT "test y"
END
CLASS
COLOR 255 0 0
SYMBOL "circle"
SIZE 10
LABEL
COLOR 0 0 0
BACKGROUNDCOLOR 200 200 100
POSITION UR
TYPE truetype
FONT arial
MINSIZE 10 # this has no effect on the label background scaling
SIZE 20
MAXSIZE 30 # this has no effect on the label background scaling
END
END # CLASS
END # LAYER
END
*******************************************************
--
Håvard Tveite Phone: +47 64948857
Department of Mapping Sciences Fax: +47 64948856
Agricultural University of Norway
POBox 5034, N-1432 Ås, NORWAY http://www.nlh.no/ikf/
More information about the mapserver-dev
mailing list