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

Adrian Popa adrian_gh.popa at romtelecom.ro
Mon Jul 27 04:44:31 PDT 2009


Hello Thomas,

Thank you for your reply. I tried your solution and it draws a dashed 
line paralel to my feature (on each side because the symbol is thicker). 
This is nice, but I was wondering if it's possible to draw the lines at 
an angle relative to my feature, thus created the "hatch" effect.

If this is not possible with a simple symbol - would it be possible with 
a graphical symbol (picture)? And if yes, should I expect a high 
performance penalty?

Thanks again,
Adrian

Thomas Bonfort wrote:
> 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
>>
>>     
>
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090727/462d97f5/attachment.htm>


More information about the MapServer-users mailing list