[Mapserver-users] Point display question

Amit S BEHERE abehere at cs.ucsd.edu
Tue Feb 10 15:35:09 EST 2004


Hi all,

this is in continuation of the question I asked previously (below)
regarding rotating symbols. I understand that you cannot rotate symbols.
So from the response I received (below) my guess is

I need to associate the symbol (my .png file) with a label
and rotate the label.

I have tried doing that but have so far been unsuccessful. My map file is
below I have hilited the parts that I think need change after which things
should work.

MAP
  IMAGETYPE      PNG
  EXTENT  	     -118.23 33.99 -118.22 34.00
  SIZE 500 500
  SHAPEPATH      "data"
  STATUS ON
  UNITS METERS
  TRANSPARENT ON

# *********************START****************************************
 SYMBOL
 Name 'mysymbol'
 TYPE PIXMAP
 IMAGE "c:\mstutorial\images\trial.png"
 END

This symbol (or more correctly the trial.png file I guess) needs to be
associated with a label so that it can be rotated

# ********************END***********************************************


  LAYER
    NAME         vernon_sewers
    DATA         vernon_sewerstructures


#***********************START******************************************

    LABELITEM   "????????"
    LABELANGLEITEM "Angle"

I do not understand what to put in LABELITEM field. I think I need to
associate my labelitem field with my .png file
By the way there is nothing in the database (i.e the .dbf file) that
refers to my .png file.
#
**********************END************************************************************

    STATUS       DEFAULT
    TYPE         POINT

CLASS
     COLOR        0 0 0

	SYMBOL 'mysymbol' # THIS LINE NEEDS TO GO.

# ********************START***********************************
LABEL
 There is some code here too that needs to be added THAT ACTUALLY DISPLAYS
THE LABEL. I do not know what.
END
#*******************END***********************************

      SIZE  6
END


  END

END

At the moment you can't rotate symbols. You can rotate labels though so
you could use a symbol ttf file for "symbols" and then use the
LABELANGLEITEM property to rotate things feature-by-feature. I know
folks are doing this with weather symbols like wind barbs and it works
great.

Steve

>>> Amit S BEHERE <abehere at cs.ucsd.edu> 02/04/04 7:08 PM >>>
Hi all,

I have a mapfile that shows points on a map using a symbol. The points
are
in a shapfile which among other things has a field for the rotation
angle
for the symbol (i.e the dbf database associated with the shapefile has a
column for rotation angle). Is there a way by which I could display the
symbol rotated at the angle given in the table.

Here is my layer definition:

LAYER
NAME "sewerstructures"
TITLEINDEX vernon_global_index
TITLEITEM FILES
CLASSITEM "Style"
DATA "sewerstructures"
STATUS ON
TYPE POINT
MAXSCALE 32000
MINSCALE 1

CLASS
EXPRESSION ('[STYLE]' eq 'Manhole-Vernon')
COLOR 0 0 0
OUTLINECOLOR 0 0 0
size 9
symbol 1
END
END

Amit Behere.
UCSD.
"Technology doesn't make your life more difficult or easy, it just
changes
the rules"......Vishwanathan Anand



Amit Behere.
UCSD.
"Technology doesn't make your life more difficult or easy, it just changes
the rules"......Vishwanathan Anand




More information about the mapserver-users mailing list