dynamic symbol rotation
Steve Lime
steve.lime at DNR.STATE.MN.US
Fri Mar 25 14:27:53 PST 2005
Actually there has been some work done on this, although it is not
generally applicable. A custom hatching symbol was added to allow for
artibtrary rotation and to support that SIZEITEM and ANGLEITEM
parameters have been added to class style objects. Only the hatch
symbols take advantage of them though. I've no immediate plans to add
general rotation to all symbols but it's not nearly as hard as it might
have been. Adding for TrueType symbols should be trivial. I may have
already done that but I'm not sure (will check the source). Vector and
bitmap symbols will take some work. At one point I had heard of a hacked
version of MapServer that supported rotated symbols but I never heard
back from the hackers...
So, short answer is no.
Steve
>>> Brent Fraser <bfraser at GEOANALYTIC.COM> 03/24/05 10:32 AM >>>
Franceso,
I ran into this a couple of years ago, and I don't think the situation
has changed.
The short answer is no, there is no map file keyword to indicate the
field to use as the rotation value.
The long answer is there are a couple of work-arounds that might work
for you:
1. Use LABEL with POSITION CC and LABELANGLEITEM to indicate the field
with the rotation
- if you want to have a text label along with the "symbol" then
you'll to define another LAYER just for that
- this will only work for using TrueType fonts for symbols (it
won't work for Bitmap or Vector symbols)
OR
2. Create different symbols for the different directions, and then use
CLASS and EXPRESSION to assign the appropriate symbol for the different
values in the field.
- We used this method to show ship symbols based on a "heading"
attribute:
CLASS
EXPRESSION ([HEADING]<23 or [HEADING]>337)
SYMBOL 'arrowup'
SIZE 10
COLOR 255 0 0
OUTLINECOLOR 0 0 0
END # CLASS
CLASS
EXPRESSION ([HEADING]>=23 and [HEADING]<67)
SYMBOL 'arrowuprt'
:
In this case we generalized the heading values to eight different
symbols representing eight points on a compasss.
I don't think there is any work planned to allow rotation of symbols.
Brent Fraser
----- Original Message -----
From: Francesco Sozzi
To: MAPSERVER-USERS at LISTS.UMN.EDU
Sent: Thursday, March 24, 2005 3:40 AM
Subject: [UMN_MAPSERVER-USERS] dynamic symbol rotation
Hi all,
I would like to rotate point symbols reading rotation angle from a
field.
I think that at this version it is not possible.
Anybody knows if this possibility will be provided in any future
release?
Regards
Francesco
More information about the MapServer-users
mailing list