[mapserver-users] RE: [Geomoose-users] arrow symbology

Bob Basques Bob.Basques at ci.stpaul.mn.us
Thu Feb 28 15:54:19 EST 2008


Adam,

I'm copying the MapServer list on this, then it gets into the archives.

Here's how I do it for a sewer layer to show direction of the flow (the lines are drawn in the direction of flow)  There are two different classes below for different colors :

SYMBOL
  NAME "carret"
  TYPE truetype
  FONT 'arial-bold'
  CHARACTER ">"
  GAP 50
END
---------------------------------
CLASS
  EXPRESSION (('[STATUS]' eq 'ACTV') AND (([FROM_INVERT] == -99) or ([TO_INVERT] == -99)))
  STYLE
    SIZE 15
    SYMBOL "carret"
    COLOR 255 0 0 
  END
END
CLASS
  EXPRESSION (('[STATUS]' eq 'ACTV') AND ('[SYSTEM_TYPE]' eq 'Storm'))
  STYLE
    COLOR 60 60 255
    SIZE 15
    SYMBOL "carret"
  END
END

bobb





Bob Basques
GIS Systems Developer
City of Saint Paul, MN

GISmo 
Powered by
GeoMOOSE



>>> "Adam Feidt" <afeidt at edenprairie.org> wrote:

How do you call a symbol from the label object?  I tried something similar using the TEXT ">" parameter from the CLASS object and it didn't work.  See attachment for my results.
 
Adam M. Feidt
GIS Coordinator
City of Eden Prairie
8080 Mitchell Rd
Eden Prairie, MN 55344
phone# 952-949-8443
fax# 952-949-8334
 
From: Bob Basques [mailto:Bob.Basques at ci.stpaul.mn.us] 
Sent: Thursday, February 28, 2008 1:28 PM
To: Adam Feidt
Subject: RE: [Geomoose-developers] arrow symbology
 
Adam,
 
You can use a Truetype font and grab the greater-then or less-than characters to use as the directional  arrowhead.   You will need to also use either the "auto" or the "follow" value for the ANGLE parameter in the Mapfile.   Basically you just label the line with one of the characters.
 
You just set up a truetype symbol.  Something like:
 
  SYMBOL
    NAME 'arrow'
    TYPE TRUETYPE
    FONT '<some font name>'
    CHARACTER '<some character index number>'
  END
 
or
 
  SYMBOL
    NAME 'arrow'
    TYPE TRUETYPE
    FONT 'courier'
    CHARACTER '7'
  END
 
bobb

>>> "Adam Feidt" <afeidt at edenprairie.org> wrote:
Bobb,
     I set up a truetype label using this character ">" and applied the
ANGLE parameter and I still can't get the arrows to show line direction.
It appears like it is working, but in some cases it is not consistent
with ArcMap's line direction.  When you get some time can you email me
an example.  Are you sure this is possible?

Adam M. Feidt
GIS Coordinator
City of Eden Prairie
8080 Mitchell Rd
Eden Prairie, MN 55344
phone# 952-949-8443
fax# 952-949-8334


-----Original Message-----
From: Bob Basques [mailto:Bob.Basques at ci.stpaul.mn.us] 
Sent: Tuesday, February 26, 2008 4:36 PM
To: Adam Feidt
Subject: RE: [Geomoose-developers] arrow symbology

Try taking alook at the ANGLE parameter I think it's used inside of a
LABEL.

I'm not in the office right now, or I would pull an example from there.

bobb



****************  You can't be late until you show up.  ***************
************  You never learn anything by doing it right.  ************
***  War doesn't determine who's right. War determines who's left.  ***

>>> "Adam Feidt" <afeidt at edenprairie.org> 02/26/08 4:27 PM >>>
Bobb,
     Thanks for your help again.  I finally thought I got it to work,
but the arrows aren't necessarily pointing out the line direction.  I'm
using a PIXMAP Symbol with the GAP set.  It says on the MapServer
website the image should be drawn along the line.  Thus, if my arrow is
pointing right and it draws from beginning to end it should show line
direction.  When I compare it to the line direction in ArcMap it doesn't
always match up.  My code is below.  I don't see the Auto/Follow
parameter unless you use a label.  Are you using a .gif or .png as a
label when showing line direction?

SYMBOL
NAME 'ARROW'
TYPE PIXMAP
FILLED TRUE
GAP 25
IMAGE '../symbols/Arrow.gif'
END #end symbol

CLASS
NAME 'Main'
EXPRESSION ""
       STYLE
         COLOR 85 255 0
         SYMBOL "plainline"
         SIZE 2
       END
       STYLE
         COLOR 0 0 0
         SYMBOL 'ARROW'
         SIZE 10
       END

Adam M. Feidt
GIS Coordinator
City of Eden Prairie
8080 Mitchell Rd
Eden Prairie, MN 55344
phone# 952-949-8443
fax# 952-949-8334


-----Original Message-----
From: Bob Basques [mailto:Bob.Basques at ci.stpaul.mn.us] 
Sent: Tuesday, February 26, 2008 1:43 PM
To: Adam Feidt
Subject: Re: [Geomoose-developers] arrow symbology

I've done this with a truetype font symbol and using the AUTO/FOLLOW
parameter (depending on version of MapServer) to orient the arrow
marker.  The marker is oriented based on the direction of the ployline
vertices in the element.

bobb



>>> "Adam Feidt" <afeidt at edenprairie.org> 02/26/08 12:05 PM >>>
I would like to display line direction using an arrow symbol spaced
along a line.  I've tried numerous examples from the web with no luck.
Does anyone have any symbology definitions that would accomplish this?
Any other ideas?



Adam M. Feidt

GIS Coordinator

City of Eden Prairie

8080 Mitchell Rd

Eden Prairie, MN 55344

phone# 952-949-8443

fax# 952-949-8334
-------------- next part --------------
Skipped content of type multipart/related


More information about the mapserver-users mailing list