1

I need to display arrows alongside to line features. Lines represent water pipes. The issue I'm facing is that lines are a concatenation of numerous line features of various lengths. Therefore, symbols are attached to every line, whatever its length. This makes symbols either overlaying or touching eachother (as in example below).

Water pipes with touching arrow symbols

Inside my mapfile, I define the display rules of my symbols in the STYLE element:

    STYLE
        SYMBOL "wp_arrow"
        GAP -100
        COLOR 255 0 0
        OFFSET -5 -99
        SIZE 6
    END

I would like these rules to apply only to line features being more than 10 meters long (or x map units).

  • What about generating a column with the length of the lines and then using two classes depending on the length attribute? – Zoltan Nov 30 '15 at 14:15
1

Using geotransform might help you in this case, something like:

STYLE
GEOMTRANSFORM "end"
COLOR 100 200 100
SYMBOL "arrow"
SIZE 7.0
ANGLE AUTO
END # STYLE

It'd be easier to just add a "pseudo-arrow" symbol like this:

SYMBOL
  NAME "V"
  TYPE truetype
  FONT "arial"
  CHARACTER "V"
END # SYMBOL

I received these solutions from a similar problem with line features, you can find the whole story here: MapServer: Symbol (v-line) style that automatically follows line direction

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.