[Mapserver-users] Re: Oriented arrows mapserver

woodbri at swoodbridge.com woodbri at swoodbridge.com
Tue Dec 9 11:31:25 PST 2003


Hi all,

Another idea might be to create a truetype font symbol to use when 
rendering the line so you could apply arrows along the line like 
railroad ties. You would have to experiment a little to get the right 
look.

A general related problem is how to specify the location of symbols 
like this. It would be nice to be able to assume the line is in unit 
space (ie: 0.0 - 1.0 from start to end) and then be able to say you 
want to apply a symbol or label at some location(s) along that unit 
space of the line/polyline. Then something like LOCATE_AT 0.0, 0.5, 
1.0 would place the symbol at the beginning (0.0), the mid-point 
(0.5) and the end (1.0)

Or for street segments that have a direction attribute, I would like 
to style them with an indication of street direction, like an arrow 
in either the from-to direction of the to-from direction. This could 
be sorted out using classes if I can generate the arrow to align with 
the street.

-Steve W.

On 9 Dec 2003 at 17:01, Michael Schulz wrote:

> Hi,
> perhaps someone on the list has more experience on the problem below (it 
> usually gives a lot more answers when posting to the list).
> 
> My guess would be you could try and use the street data layer labeling 
> for drawing arrow symbols. Let mapserver rotate the labels based on the 
> direction of each line segment (ANGLE auto, Mapserver can only rotate 
> labels for line data automatically), and use the static text "->" (your 
> arrow character) as label text. Imagine this as instead of labeling with 
> the street name rotated along the street direction the streets are 
> labelled with the arrow.
> 
> HTH, Michael
> 
> 
> Ballini Yvain schrieb:
> 
> >  
> > 
> > Dear Michael,
> > 
> > I would like to use an arrow symbol which follows the direction of my
> > street layer. I still have the shapefile of the arrows but when I choose
> > a symbol in the layer for visualizing the arrows, it doesn't follow the
> > street direction.
> > The symbol is this one:
> > 
> > SYMBOL
> >   NAME "arrow"
> >   TYPE truetype
> >   FONT arial
> >   CHARACTER "->"
> >   #POSITION CC
> >   GAP -10
> > END
> > 
> > 
> > And the arrow-layer is this one:
> > 
> > LAYER
> >   NAME freccie_navtech
> >   PROJECTION
> >   "proj=longlat"
> >   "ellps=intl"
> >   "no_defs"
> >   END
> >   STATUS OFF
> >   DATA arrow_font_point
> >   TYPE POINT
> >    CLASS
> >     STYLE
> >       SYMBOL 'arrow'
> >       size 20
> >       COLOR 245 88 128
> >       ANTIALIAS TRUE
> >     END
> >   END
> > END
> > 
> > If I change the position option in the symbol definition, it doesn't
> > change anything for the orientation.
> > Do you know where I'm wrong ??
> > 
> > Thank you very much.
> > 
> > Yvain Ballini.
> > 
> > 
> 
> -- 
> -----------------------------------------------------------
> 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
> 
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> 






More information about the MapServer-users mailing list