negativ labelsize

Stephan Holl stephan.holl at INTEVATION.DE
Thu Mar 29 11:22:55 EDT 2007


Hallo List,

we have created a python script which generates a high-resolution png
from the current MS-settings using python mapscript. Basically it
grabes the mapfile and multiplys all label-sizes by 4 which results in
a large image with also large labels.

I have encountered some problems if there is no label-size given the
soze value is -1. 
So multiplying by 4 results in -4 which makes mapscript crash:
Traceback (most recent call last):
  File "/var/www/cgi-bin/printmapimg", line 162, in ?
    imgobj = theMap.draw()
  File "/usr/lib/python2.2/site-packages/mapscript.py", line 1419, in
draw def draw(*args): return _mapscript.mapObj_draw(*args)
_mapscript.MapServerError: msGetBitmapFont(): GD library error. Invalid
bitmap font. Must be one of tiny, small, medium, large or giant. 
[Thu Mar 29 10:06:15 2007] [error] [client 127.0.0.1] Premature end of
script headers: /var/www/cgi-bin/printmapimg

As you can see, MS is running with python2.2; MS is version 4.4.2,
no current version.

Is this behaviour known? Shouldnt all negative values be ignored?

Best

	Stephan



More information about the mapserver-users mailing list