[mapserver-users] Border style of polygon

Havard Tveite havard.tveite at umb.no
Tue May 29 02:34:40 PDT 2012


You could try OFFSET - see http://mapserver.org/mapfile/style.html

"For lines, an OFFSET of n -99 will produce a line geometry that
is shifted n SIZEUNITS perpendicular to the original line geometry.
A positive n shifts the line to the right when seen along the
direction of the line. A negative n shifts the line to the left
when seen along the direction of the line."

style
   color 255 0 0
   width 1
   OFFSET 1 -99
end
style
   color 255 0 0
   width 1
   OFFSET -1 -99
end



Håvard Tveite

On 5/29/2012 10:58 AM, Denis Rykov wrote:
> Thanks for quick response!
>
> Are any ways to draw internal line (255 255 255 color in your example) with transparency (-1 -1 -1 doesnt work, in this case I see red line, but I would like to see underlying layer).
>
> On Tue, May 29, 2012 at 3:49 PM, thomas bonfort <thomas.bonfort at gmail.com <mailto:thomas.bonfort at gmail.com>> wrote:
>
>     something like this should work, with no "symbol"
>
>     style
>     outlinecolor 255 0 0
>     width 3
>     end
>     style
>     outlinecolor 255 255 255
>     width 1
>     end
>
>     --
>     thomas
>
>     On Tue, May 29, 2012 at 10:45 AM, Denis Rykov <rykovd at gmail.com <mailto:rykovd at gmail.com>> wrote:
>      > I have WMS polygonal layer and want to draw polygon's border with the
>      > following style:
>      >
>      > http://i.stack.imgur.com/J2A7x.png
>      >
>      > My symbol's description:
>      >
>      > SYMBOL
>      > NAME "double_line"
>      > TYPE vector
>      > POINTS
>      > 0 0 1 0 -99 -99 0 1 1 1
>      > END
>      > END
>      >
>      > CLASS section in mapfile:
>      >
>      > CLASS
>      > STYLE
>      > OUTLINECOLOR 255 0 0
>      > SYMBOL 'double_line'
>      > SIZE 3
>      > WIDTH 1
>      > END
>      >
>      > But in this case you can see self intersection in polygon's edge:
>      >
>      > http://i.stack.imgur.com/5Etem.png
>      >
>      > What is the righ way to get correct border style?
>      >
>      > _______________________________________________
>      > mapserver-users mailing list
>      > mapserver-users at lists.osgeo.org <mailto:mapserver-users at lists.osgeo.org>
>      > http://lists.osgeo.org/mailman/listinfo/mapserver-users
>      >
>
>
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users

-- 
Håvard Tveite
Department of Mathematical Sciences and Technology, UMB
Drøbakveien 31, POBox 5003, N-1432 Ås, NORWAY
Phone: +47 64965483 Fax: +47 64965401 http://www.umb.no/imt/


More information about the mapserver-users mailing list