I think this explains how to do it:

http://gis.stackexchange.com/questions/157472/mapserver-symbol-v-line-style-that-automatically-follows-line-direction

On 2/27/2017 3:54 PM, Björn Danielsson wrote:
Hello and thanks for answering!

Look at the attached png.
I would like to replace the '>' on the line with the little red arrow
symbol at the top.

'Riktning' means direction. That is if the flow of the creek has the
same direction as the 'flow' of the line, or not.

Mapfile:

    CLASS
      NAME       "bäck/dike"
      EXPRESSION ("[TYP]"="40")
      STYLE
        COLOR      0 0 255
        WIDTH      3
      END

#      STYLE
#        GEOMTRANSFORM "start"
#        SYMBOL "pil3"
#        SIZE  10
#        ANGLE AUTO
#     END

      LABEL
        EXPRESSION ("[riktning]"="R")
        TEXT   ">"
        COLOR         "#ffffff"
        OUTLINECOLOR  "#0000ff"
        SIZE           10
        POSITION       CC
        REPEATDISTANCE 75
        ANGLE          AUTO2
        FORCE          TRUE
      END
      LABEL
        EXPRESSION ("[riktning]"="F")
        TEXT   "<"
        COLOR         "#ffffff"
        OUTLINECOLOR  "#0000ff"
        SIZE           10
        POSITION       CC
        REPEATDISTANCE 75
        ANGLE          AUTO2
        FORCE          TRUE
      END
      LABEL
        TEXT       "[text]"
        COLOR      0 0 255
        OUTLINECOLOR 255 255 255
        TYPE       TRUETYPE
        FONT       arial
        SIZE       8
        ANTIALIAS  FALSE
        POSITION   CC
        PARTIALS   FALSE
        FORCE      TRUE
        MINDISTANCE 0
        BUFFER      0
        ANGLE      FOLLOW
        MAXOVERLAPANGLE 180
        OFFSET     7 99
      END
    END

Björn Danielsson

    -----Original Message-----
    From: Stephen Woodbridge <wood...@swoodbridge.com>
    To: mapserver-users@lists.osgeo.org
    Date: Mon, 27 Feb 2017 10:02:32 -0500
    Subject: Re: [mapserver-users] Road shields on Mapserver 7

    Don't use the geotransform labelpnt, in fact don't label it:

       symbol
         name "arrow-north"
         type truetype
         font arrows
         character "&#21;"
         filled true
       end
       LABEL
         ...
         CLASS
           STYLE
             COLOR "#444488"
             SIZE 8
           END
         END
         CLASS
           STYLE
             SYMBOL "arrow-north"
             GAP -60
             ANGLE -90
             COLOR "#555555"
             SIZE 8
           END
         END
       END

    -Steve W

    On 2/27/2017 4:04 AM, Björn Danielsson wrote:
    > Interesting discussion!
    > I have an issue with geotransform 'labelpnt' I so far have failed
    to solve.
    >
    > Consider a line that depicts a creek. Sometimes it is important to
    show
    > the direction of flow. That is mostly achieved on maps by placing
    arrows
    > along the creek showing which way the water flows.
    >
    > I have tried to use LABEL and GEOMTRANSFORM 'labelpoint' with an arrow
    > symbol and where the label has no text but has REPEATDISTANCE and
    ANGLE.
    > Problem is that the symbol is not affected by ANGLE ( neither FOLLOW,
    > AUTO or AUTO2 ). Does anybody know how to rotate labelpoint symbols or
    > is it not possible?.
    >
    > Plan B is to use a LABEL with TEXT = ">" which works fine but is not
    > that elegant.
    >
    > Björn D
    >
    >
    >     -----Original Message-----
    >     From: lars.schylb...@blixtmail.se
    <mailto:lars.schylberg%40blixtmail.se>
    >     To: mapserver-users@lists.osgeo.org
    <mailto:mapserver-users%40lists.osgeo.org>
    >     Date: Thu, 23 Feb 2017 21:15:36 +0100
    >     Subject: Re: [mapserver-users] Road shields on Mapserver 7
    >
    >     Hi,
    >
    >     I more detail in my previous example the offset in the style block
    >     is because the example is part of a block with three road shields
    >     stacked.
    >
    >     /Lars S.
    >
    >     One single shield would be like this:
    >
    >                 LABEL
    >                     EXPRESSION ('[VAGNR1]' ~ '^[0-9][0-9]$' )
    >                     # Blue two digits
    >                     STYLE
    >                         GEOMTRANSFORM "labelpnt"
    >                         SYMBOL VAGNRBOX
    >                         COLOR 64 168 217
    >                         SIZE 10
    >                     END
    >                     TEXT '[VAGNR1]'
    >                     FONT 'sc'
    >                     TYPE truetype
    >                     POSITION cc
    >                     COLOR 255 255 255
    >                     SIZE 7
    >                     # FORCE: TRUE
    >                     REPEATDISTANCE 150
    >                     MINDISTANCE 300
    >                     PRIORITY 2
    >                 END
    >
    >
    >
    >
    ------------------------------------------------------------------------
    >         -----Originalmeddelande-----
    >         Från: lars.schylb...@blixtmail.se
    <mailto:lars.schylberg%40blixtmail.se>
    >         <mailto:lars.schylb...@blixtmail.se
    <mailto:lars.schylberg%40blixtmail.se> >
    >         Till: mapserver-users@lists.osgeo.org
    <mailto:mapserver-users%40lists.osgeo.org>
    >         <mailto:mapserver-users@lists.osgeo.org
    <mailto:mapserver-users%40lists.osgeo.org>>
    >         Datum: 2017-02-23 21:04
    >         Ämne: Re: [mapserver-users] Road shields on Mapserver 7
    >
    >
    >
    >         Hi,
    >
    >         This is how I do it in MS7.0.  This is just part of the class
    >         with the first two labels.  I have different shield
    depending on
    >         the number of digits.
    >         I also have different color depending on the color of the
    >         shield.  This is following European road label standard.
    >
    >         /Lars S
    >
    >
    >                 CLASS
    >                     EXPRESSION ("[VAGNR1]" ~ "^[E0-9]*$" AND
    "[VAGNR2]"
    >         ~ "^[E0-9]*$" AND "[VAGNR3]" ~ "^[E0-9]*$"  )
    >                     LABEL
    >                         EXPRESSION ('[VAGNR1]' ~ '^E.$')
    >                         # first shield - green - one digit
    >                         STYLE
    >                             GEOMTRANSFORM "labelpnt"
    >                             SYMBOL VAGNRBOX
    >                             COLOR 115 179 115
    >                             OFFSET 0 -13
    >                             SIZE 10
    >                         END
    >                         TEXT '[VAGNR1]'
    >                         FONT 'sc'
    >                         TYPE truetype
    >                         POSITION CC
    >                         COLOR 255 255 255
    >                         SIZE 7
    >                         OFFSET 0 -13
    >                         REPEATDISTANCE 100
    >                         MINDISTANCE 100
    >                         PRIORITY 9
    >                         FORCE GROUP
    >                     END
    >                     LABEL
    >                         EXPRESSION ('[VAGNR1]' ~ '^E..$')
    >                         # first shield - green - two digits
    >                         STYLE
    >                             GEOMTRANSFORM "labelpnt"
    >                             SYMBOL VAGNRBOX_3TKN
    >                             COLOR 115 179 115
    >                             OFFSET 0 -13
    >                             SIZE 10
    >                         END
    >                         TEXT '[VAGNR1]'
    >                         FONT 'sc'
    >                         TYPE truetype
    >                         POSITION CC
    >                         COLOR 255 255 255
    >                         SIZE 7
    >                         OFFSET 0 -13
    >                         REPEATDISTANCE 100
    >                         MINDISTANCE 100
    >                         PRIORITY 9
    >                         FORCE GROUP
    >                     END
    >
    >
    ------------------------------------------------------------------------
    >
    >
    ------------------------------------------------------------------------
    >         _______________________________________________
    >         mapserver-users mailing list
    >         mapserver-users@lists.osgeo.org
    <mailto:mapserver-users%40lists.osgeo.org>
    >         <mailto:mapserver-users@lists.osgeo.org
    <mailto:mapserver-users%40lists.osgeo.org>>
    >         https://lists.osgeo.org/mailman/listinfo/mapserver-users
    >
    >
    >
    >     --
    >
    >
    >
    > _______________________________________________
    > mapserver-users mailing list
    > mapserver-users@lists.osgeo.org
    <mailto:mapserver-users%40lists.osgeo.org>
    > https://lists.osgeo.org/mailman/listinfo/mapserver-users
    >


    ---
    This email has been checked for viruses by Avast antivirus software.
    https://www.avast.com/antivirus

    _______________________________________________
    mapserver-users mailing list
    mapserver-users@lists.osgeo.org
    <mailto:mapserver-users%40lists.osgeo.org>
    https://lists.osgeo.org/mailman/listinfo/mapserver-users



---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to