[mapserver-users] Applying a hatch over a line layer

Thomas Bonfort thomas.bonfort at camptocamp.com
Mon Jul 27 07:11:53 EDT 2009


hi,

hatches only apply to polygon layers.

what you are probably looking for is the PATTERN keyword:

symbol
  type simple
  pattern 2 2 end
  name "dashes"
end


regards,
thomas

www.camptocamp.com
+33 4 79 26 57 97



On Mon, Jul 27, 2009 at 11:37, Adrian Popa<adrian_gh.popa at romtelecom.ro> wrote:
> Hello,
>
> I'm trying to apply a hatch over a line segment, but it doesn't seem to
> work.
> My symbol definition is:
>
> SYMBOL              NAME 'hatch'
>    TYPE HATCH  END
> My layer definition is:
> LAYER
>   TYPE LINE
>   ...
>   CLASS
>      NAME "Test"
>      EXPRESSION ( "[flag]" eq "1")
>      STYLE                                     SYMBOL 'hatch'
>           ANGLE 45                               SIZE 3 #spacing between
> lines
>           WIDTH 4 #width of each line           color "#000000"
>       END                                   style
>         color "#fff94d"                       width 2
>         antialias true                       end
>   END
> END
>
> The behavior is the following: mapserver draws the lines using the second
> style (a yellowish color), but doesn't draw a hatch over my line.
>
> I've tried with the hatch symbol after the style definition, but it still
> doesn't work.  The hatch worked for POLYGON layers just fine.
>
> Is there any way I can use it for LINE data?
>
> Thanks,
> Adrian
>
> P.S. I'm using mapserver 5.4.1
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>


More information about the mapserver-users mailing list