Railroad symbol

Camden Daily cdaily at GMAIL.COM
Mon Feb 28 08:21:11 PST 2005


Dylan,

Thanks for the insight.  I finally got mine working just the way I
wanted, with two lines and 'ties' in between that angle with the
railroad.  Here's how I'm doing it:

  LAYER
    NAME "rail"
    TYPE LINE
    STATUS OFF
    DATA "rail"
    CLASS
      STYLE
        SYMBOL 'rail_line'
        COLOR 60 60 60
        SIZE 1
        OFFSET -2 -2
      END
      STYLE
        SYMBOL 'tie'
        COLOR 60 60 60
        SIZE 9
      END
      STYLE
        SYMBOL 'rail_line'
        COLOR 60 60 60
        SIZE 1
        OFFSET 2 2
      END
    END
    PROJECTION
      "init=epsg:4326"
    END
  END

  SYMBOL
    NAME 'rail_line'
    TYPE ellipse
    FILLED true
    POINTS
      1 1
    END
  END

  SYMBOL
    NAME 'tie'
    TYPE TRUETYPE
    FONT "arial"
    CHARACTER "I"
    GAP -10        # force mapserver to angle the symbol
  END

-Camden

On Fri, 25 Feb 2005 12:03:55 -0800, Dylan Keon <keon at nacse.org> wrote:
> Camden Daily wrote:
> > Does anyone have a good symbol or set of symbols that they use to draw
> > railroads?  I'd like the basic two parallel lines with horizontal
> > 'ties'.  I just can't seem to get it to work right.
> >
> > Otherwise, does anyone have any in-depth documentation for how to draw
> > symbols?  The documentation out there seems to be more a set of
> > examples rather than an explanation of how mapserver actually
> > interprets the data.
>
> Camden,
>
> The following will produce a single line with tie marks.  Not a
> double-parallel line, but it might get you started anyway.
>
> --Dylan
>
> In layer definition:
>    CLASS
>      NAME 'Active Line'
>      EXPRESSION /Active/
>      STYLE
>        SYMBOL 'circle'
>        COLOR 0 0 0
>        SIZE 1
>      END
>      OVERLAYSYMBOL 'fence'
>      OVERLAYCOLOR 0 0 0
>      OVERLAYSIZE 7
>    END
>
> In my symbols.sym file:
>    SYMBOL #12
>      NAME "fence"
>      TYPE TRUETYPE
>      FONT "arial"
>      CHARACTER "I"
>      GAP 10
>    END
>



More information about the MapServer-users mailing list