Hi,

Trying to guess the answer myself. Generally it may not give good results at 
all to render features and styles one by one:

feature 1 - style 1
feature 1 - style 2
feature 2 - style 1
feature 2 - style 2

The result could look something like the “Unexpected results” in 
http://www.mapgears.com/en/blog/archive/2013-03-05-roads_network_mapping
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 
http://mapserver.org/development/rfc/ms-rfc-54.html is somehow related.

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.

-Jukka-

Rahkonen Jukka wrote:

Hi,

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.

-Jukka Rahkonen-

Richard Greenwood wrote:

As others have suggested, you need to "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.

Rich


On Fri, Jun 17, 2016 at 2:47 PM, Ziegler Stefan 
<stefan.zieg...@bd.so.ch<mailto:stefan.zieg...@bd.so.ch>> wrote:
Hi Jukka

Yes. Seems similar to what you can do with QGIS.

Regards
Stefan

> -----Ursprüngliche Nachricht-----
> Von: Rahkonen Jukka (MML) 
> [mailto:jukka.rahko...@maanmittauslaitos.fi<mailto:jukka.rahko...@maanmittauslaitos.fi>]
> Gesendet: Freitag, 17. Juni 2016 16:20
> An: Ziegler Stefan; 
> 'mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org>'
> Betreff: Re: Rendering of adjacent dashed lines
>
> Hi,
>
> The only method that really works is to remove adjacent lines. Your trick 
> seems to be
> the same as this https://knowledge.autodesk.com/support/autocad-map-
> 3d/troubleshooting/caas/sfdcarticles/sfdcarticles/Using-a-dashed-line-symbol-with-
> adjacent-polygons-masking.html
> but they used a wider white line. However, it feels usable only if the 
> background is also
> white and there are no lines very close to each other.
>
> -Jukka Rahkonen-
>
>
> Ziegler Stefan wrote:
>
> > Hi
>
> > I'm trying to render some lines with a pattern. This works and looks great 
> > as long as
> the lines are not adjacent. When the lines share a common border the dashed 
> lines
> may look ugly since one dashed line is rendered on top of the other rendered 
> dashed
> line. I tried to add a white solid line under the dashed line:
>
>     CLASS
>       STYLE
>         COLOR 255 255 255
>         WIDTH 2
>         LINECAP BUTT
>       END
>       STYLE
>         COLOR 0 0 0
>         WIDTH 2
>         LINECAP BUTT
>         PATTERN 20 4 2 4 2 4 END
>       END
>     END
>
>
> But the behaviour is still the same. Is there a trick/workaround for this? 
> I'm using
> MapServer 7.0.1.
>
> Best regards
> Stefan Ziegler
>
>
>
> Freundliche Grüsse
> Stefan Ziegler
> Kantonsgeometer / Leiter Amt für Geoinformation
>
> Amt für Geoinformation
> Rötistrasse 4
> 4500 Solothurn
>
> Telefon +41 32 627 75 96
> Telefax +41 32 627 75 98
> stefan.zieg...@bd.so.ch<mailto:stefan.zieg...@bd.so.ch>
> http://www.so.ch
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org>
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org>
http://lists.osgeo.org/mailman/listinfo/mapserver-users



--
Richard W. Greenwood, PLS
www.greenwoodmap.com<http://www.greenwoodmap.com>
_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to