<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.Shkpostityyli17
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:#1F497D;}
span.Shkpostityyli18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 2.0cm 70.85pt 2.0cm;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="FI" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Trying to guess the answer myself. Generally it may not give good results at all to render features and styles one by
one:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">feature 1 - style 1<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">feature 1 - style 2<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">feature 2 - style 1<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">feature 2 - style 2<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">The result could look something like the “Unexpected results” in
<a href="http://www.mapgears.com/en/blog/archive/2013-03-05-roads_network_mapping">
http://www.mapgears.com/en/blog/archive/2013-03-05-roads_network_mapping</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Usually the result will look better if style 1 for all the features is rendered at the bottom and style 2 above that.
It may be that <a href="http://mapserver.org/development/rfc/ms-rfc-54.html">http://mapserver.org/development/rfc/ms-rfc-54.html</a> is somehow related.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">A side effect is that the “dashed line with solid white background” trick which seems to be well known in the internet
does not work with Mapserver.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">-Jukka-<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">Rahkonen Jukka wrote:<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">I would like to know why it does not work by painting solid white line underneath and dashed line above it. If the totally
overlapping lines were painted one by one, the last line would cover the dashes of the previously rendered line with total white and the result would look like it does in QGIS and ArcCAD. Mapserver must do it in somehow different way so that the white line
of the last linestring does not paint over everything that has been rendered before.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">-Jukka Rahkonen-<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">Richard Greenwood wrote:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal">As others have suggested, you need to "<span style="font-size:9.5pt">preprocess your data to merge adjacent lines into one". This can be done with topology. PostGIS has topology support. You would have to convert (and maintain) your simple
features polygons as a PostGIS topology and then render them as lines (not polygons) in MapServer. There is also TopoJSON but I have not used it. I think it provides client-side support for topology, which is not exactly what you are asking about, but might
be worth a look.</span><o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt">Rich</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Fri, Jun 17, 2016 at 2:47 PM, Ziegler Stefan <<a href="mailto:Stefan.Ziegler@bd.so.ch" target="_blank">Stefan.Ziegler@bd.so.ch</a>> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt">
<p class="MsoNormal">Hi Jukka<br>
<br>
Yes. Seems similar to what you can do with QGIS.<br>
<br>
Regards<br>
Stefan<br>
<br>
> -----Ursprüngliche Nachricht-----<br>
> Von: Rahkonen Jukka (MML) [mailto:<a href="mailto:jukka.rahkonen@maanmittauslaitos.fi">jukka.rahkonen@maanmittauslaitos.fi</a>]<br>
> Gesendet: Freitag, 17. Juni 2016 16:20<br>
> An: Ziegler Stefan; '<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>'<br>
> Betreff: Re: Rendering of adjacent dashed lines<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal">><br>
> Hi,<br>
><br>
> The only method that really works is to remove adjacent lines. Your trick seems to be<br>
> the same as this <a href="https://knowledge.autodesk.com/support/autocad-map-" target="_blank">
https://knowledge.autodesk.com/support/autocad-map-</a><br>
> 3d/troubleshooting/caas/sfdcarticles/sfdcarticles/Using-a-dashed-line-symbol-with-<br>
> adjacent-polygons-masking.html<br>
> but they used a wider white line. However, it feels usable only if the background is also<br>
> white and there are no lines very close to each other.<br>
><br>
> -Jukka Rahkonen-<br>
><br>
><br>
> Ziegler Stefan wrote:<br>
><br>
> > Hi<br>
><br>
> > I'm trying to render some lines with a pattern. This works and looks great as long as<br>
> the lines are not adjacent. When the lines share a common border the dashed lines<br>
> may look ugly since one dashed line is rendered on top of the other rendered dashed<br>
> line. I tried to add a white solid line under the dashed line:<br>
><br>
> CLASS<br>
> STYLE<br>
> COLOR 255 255 255<br>
> WIDTH 2<br>
> LINECAP BUTT<br>
> END<br>
> STYLE<br>
> COLOR 0 0 0<br>
> WIDTH 2<br>
> LINECAP BUTT<br>
> PATTERN 20 4 2 4 2 4 END<br>
> END<br>
> END<br>
><br>
><br>
> But the behaviour is still the same. Is there a trick/workaround for this? I'm using<br>
> MapServer 7.0.1.<br>
><br>
> Best regards<br>
> Stefan Ziegler<br>
><br>
><br>
><br>
> Freundliche Grüsse<br>
> Stefan Ziegler<br>
> Kantonsgeometer / Leiter Amt für Geoinformation<br>
><br>
> Amt für Geoinformation<br>
> Rötistrasse 4<br>
> 4500 Solothurn<br>
><br>
> Telefon +41 32 627 75 96<br>
> Telefax +41 32 627 75 98<br>
> <a href="mailto:stefan.ziegler@bd.so.ch">stefan.ziegler@bd.so.ch</a><br>
> <a href="http://www.so.ch" target="_blank">http://www.so.ch</a><br>
><br>
> _______________________________________________<br>
> mapserver-users mailing list<br>
> <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">
http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><o:p></o:p></p>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">-- <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal">Richard W. Greenwood, PLS<br>
<a href="http://www.greenwoodmap.com" target="_blank">www.greenwoodmap.com</a><o:p></o:p></p>
</div>
</div>
</div>
</div>
</body>
</html>