[mapserver-users] Rotated TrueType Point Symbols - Issue

Donald Kerr donald.kerr at dkerr.co.uk
Fri Jan 2 07:57:49 PST 2009


I have created a number of TrueType symbols most of which are good enough
when positioned on the map at their default centre point.

There appears to be an issue when these are then rotated using ANGLE. They
do not appear to rotate around their centre point which can make them look
very odd when placed on the map.

Please see attached images one showing without the ANGLE applied and the
other with. If the symbol rotated around its centre point then the arrow
would simply show pointing the other way (180 degrees).

I tried to make a TTF symbol that had the head of the arrow in the centre in
the hope that it would rotate on this point. It shows correctly when no
ANGLE is applied i.e. the head of the arrow over the point on the map but,
when rotated, the error in placement is exaggerated.

Here are the CLASS and SYMBOL definitions:

CLASS
	NAME "benchMarkSymbol"
	EXPRESSION "benchMarkSymbol"
	STYLE
		SYMBOL "benchMarkSymbol"
		SIZE 12
		MAXSIZE 12
		MINSIZE 4
		COLOR 0 0 0
		ANTIALIAS TRUE
		ANGLE [orientation]
	END # STYLE
END # CLASS

SYMBOL
	NAME 'benchMarkSymbol'
	TYPE TRUETYPE
	FONT OSMasterMapSymbols
	FILLED false
	ANTIALIAS true
	CHARACTER '7'
END # SYMBOL

The question is, am I doing something wrong or is this a bug? If the latter,
is there a workaround meantime? For me just now, I'd be happy if the symbol
rotated around its centre - I could live with that as a workaround.

In a previous thread that I started about positioning of LABELs, Thomas
Bonfort said, "I'd be in favor of having a way to specify the anchor point,
either by fixing it on
0,0 , or by specifying it alongside the symbol, eg ANCHORPOINT 0.3 2". I
agree that this would be good for symbols too but it may present a problem
with scaled symbols, especially TTF. If it's not a fixed size then how can
an anchor point be specified?

Many thanks.

Regards,

Donald Kerr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: NoANGLE.png
Type: image/png
Size: 1552 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090102/21fb92bd/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: WithANGLE.png
Type: image/png
Size: 1105 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090102/21fb92bd/attachment-0001.png>


More information about the MapServer-users mailing list