[Mapserver-users] auto angle line labeling with mapscript

Michael Schulz mschulz at webgis.de
Thu May 6 11:20:24 EDT 2004

Hi Sean and other mapscripters,

i was testing this for a while now on different machines and i am nearly 
100% sure, that i can rule out mixing different versions of 
mapscript/mapserver/gd or other libs.

I tried a mapserver 4.0.1 version on a linux box and everything works 
fine there. Just on windows i get this behaviour.

Ok, in the next days i will try to use other versions of gd and 
mapserver. If nothing helps, i will write again.

Thanks, Michael

Sean Gillies schrieb:

> Michael Schulz wrote:
>> Hi,
>> I have a problem with labeling line features with the angle auto option.
>> If I draw a certain line layer with shp2img then everything works fine.
>> This is the corresponding image:
>> http://www.zopecms.de/bohrdatenportal/labeltest_shp2img.png
>> If I use the same mapfile with python/mapscript then the situation 
>> changes, the labels are drawn, but they get rotated in the wrong 
>> direction but for a "correct" angle value.
>> This is the corresponding image:
>> http://www.zopecms.de/bohrdatenportal/labeltest_pymapscript.png
>> These images were created with mapserver 4.0.1, gd-2.0.21, 
>> freetype-2.1.7 on WIN2K.
>> Has anyone using mapscript, perhaps in another flavor had the same 
>> problems?
>> TIA, Michael
>> P.S.: Could this problem be related with this bug:?
>> http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=564
> Michael,
> The shp2img program is nothing more than a command line processing
> wrapper for the msLoadMap() and msDrawMap() functions in libmap.
> The equivalent in Python would be something like
>     shp2img_map = mapscript.mapObj(mapfile_source)
>     ... # process layer, extent options, &c.
>     img = shp2img_map.draw()
>     img.save(imgfile_destination)
> If you are using the draw() method of the mapObj class, all else being 
> equal, you should see the same results from the two methods.  Are you 
> using mapObj().draw or are you using layerObj.draw()?
> Have you ruled out the possibility that you are mixing shp2img and
> _mapscript.so from different revisions?
> cheers,
> Sean
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users

Michael Schulz                                in medias res
Dipl.-Geologe                              Gesellschaft für
                                 Informationstechnologie mbH
                                      In den Weihermatten 66
		                             79108 Freiburg
                                      0761 55695-95 (Fax 96)
mschulz at webgis.de              www.webgis.de/www.zopecms.de

More information about the mapserver-users mailing list