<head>
<style type="text/css">p { margin-bottom: 0.25cm; line-height: 120%; }a:link { }</style>
<title></title>
</head>
<body><div class="iw_mail" dir="ltr">
<p style="font-variant: normal; font-style: normal; font-weight: normal; text-decoration: none"><font color="#000000"><font face="Arial"><font style="font-size: 10pt" size="2"><span style="background: transparent">Hi Andrea,</span></font></font></font></p>
<p style="margin-bottom: 0cm; font-variant: normal; font-style: normal; font-weight: normal; line-height: 138%; text-decoration: none"><font color="#000000"><font face="Arial"><font style="font-size: 10pt" size="2"><span style="background: transparent">There are several ways to think about this. I had about the same issue two years ago.</span></font></font></font></p>
<p style="margin-bottom: 0cm; font-variant: normal; font-style: normal; font-weight: normal; line-height: 138%; text-decoration: none"><br></p>
<p style="margin-bottom: 0cm; line-height: 138%"><span style="font-variant: normal"><font color="#000000"><span style="text-decoration: none"><font face="Arial"><font style="font-size: 10pt" size="2"><span lang="en-US"><span style="font-style: normal"><span style="font-weight: normal"><span style="background: transparent">One way to get organized is to use ScribeUI</span></span></span></span></font></font></span></font></span> <span style="font-variant: normal"><font color="#000000"><span style="text-decoration: none"><font face="Arial"><font style="font-size: 10pt" size="2"><span lang="en-US"><span style="font-style: normal"><span style="font-weight: normal"><span style="background: transparent">(<a href="http://mapgears.github.io/scribeui/">http://mapgears.github.io/scribeui/</a>)</span></span></span></span></font></font></span></font></span> <span style="font-variant: normal"><font color="#000000"><span style="text-decoration: none"><font face="Arial"><font style="font-size: 10pt" size="2"><span lang="en-US"><span style="font-style: normal"><span style="font-weight: normal"><span style="background: transparent">or only the scribe preprocessor. Julien-Samuel Lacroix</span></span></span></span></font></font></span></font></span> gave a good talk about this at FOSS4G in Portland and <font color="#000000"><span style="background: transparent"><font face="Arial"><font style="font-size: 10pt" size="2">I talked about this in my presentation at FOSS4G in Portland. The videos is available online.</font></font></span></font></p>
<br><p style="margin-bottom: 0cm; font-variant: normal; font-style: normal; font-weight: normal; line-height: 138%; text-decoration: none"><font color="#000000"><font face="Arial"><font style="font-size: 10pt" size="2"><span style="background: transparent">That gives You the possibility to define different cartography in different zoom levels and even use different data sets in different zoom level. It is like SCALETOKENs but even more sophisticated.</span></font></font></font></p>
<p><br></p>
<p style="margin-bottom: 0cm; font-variant: normal; font-style: normal; font-weight: normal; line-height: 138%; text-decoration: none"><font color="#000000"><font face="Arial"><font style="font-size: 10pt" size="2"><span style="background: transparent">Another way is to use separate WMS layers for different zoom levels and assemble everything with cascading WMS calls. There is good description in the German Mapserver Pro TIPPS from this year and last year (German FOSS4G) how this is done. There are performance penalties for using this method.</span></font></font></font></p>
<p><br></p>
<p style="margin-bottom: 0cm; font-variant: normal; font-style: normal; font-weight: normal; line-height: 138%; text-decoration: none"><font color="#000000"><font face="Arial"><font style="font-size: 10pt" size="2"><span style="background: transparent">A third option is to use brute force and draw small scale cartographic layers first then just continue to draw larger scale layers on top based on MAXSCALEDENOM. This requires that You have areas that are covering. This is a good approach if You have a national data set and then larger scale regional data set that is just patches, i.e. covering parts of the small scale national data set. Using this method, you could still show the national large scale data where no regional data is available.</span></font></font></font></p>
<p><br></p>
<p style="margin-bottom: 0cm; line-height: 138%"><span style="font-variant: normal"><font color="#000000"><span style="text-decoration: none"><font face="Arial"><font style="font-size: 10pt" size="2"><span style="font-style: normal"><span style="font-weight: normal"><span style="background: transparent">This is the method I prefer right now. There WAS a problem with this approach before that labels in the label cache could get mixed up. That was that labels from the national data set could show up in the larger scale presentation since the label cache is drawn last. But with Mapserver 7.0 there is a new processing command called "PROCESSING FORCE_DRAW_LABEL_CACHE=FLUSH".</span></span></span></font></font></span></font></span></p>
<p style="margin-bottom: 0cm; line-height: 138%"><br></p>
<p style="margin-bottom: 0cm; font-variant: normal; font-style: normal; font-weight: normal; line-height: 138%; text-decoration: none"><font color="#000000"><font face="Arial"><font style="font-size: 10pt" size="2"><span style="background: transparent">The usage is that I draw all layers in the national data set, then I include a dummy layer that flushes the label cache and then I continue to draw the more detailed data on top.</span></font></font></font></p>
<p style="margin-bottom: 0cm; line-height: 138%"><br></p>
<p style="margin-bottom: 0cm; line-height: 138%"><span style="font-variant: normal"><font color="#000000"><span style="text-decoration: none"><font face="Arial"><font style="font-size: 10pt" size="2"><span style="font-style: normal"><span style="font-weight: normal"><span style="background: transparent">This is in my mind the biggest improvement in Mapserver 7.0 !!!!! Thanks to Daniel and all the other developers.</span></span></span></font></font></span></font></span></p>
<p style="margin-bottom: 0cm; font-variant: normal; font-style: normal; font-weight: normal; line-height: 138%; text-decoration: none"><br></p>
<p style="margin-bottom: 0cm; font-variant: normal; font-style: normal; font-weight: normal; line-height: 138%; text-decoration: none"><font color="#000000"><font face="Arial"><font style="font-size: 10pt" size="2"><span style="background: transparent">In my current use case I have 6 different sets of cartography (more and more detailed) with about 20 - 50 layers in each set. I am doing label cache flush in between each set of layers. I get excellent performance with this method.</span></font></font></font></p>
<p><br></p>
<p style="margin-bottom: 0cm; font-variant: normal; font-style: normal; font-weight: normal; line-height: 138%; text-decoration: none"><font color="#000000"><font face="Arial"><font style="font-size: 10pt" size="2"><span style="background: transparent">A fourth option would be to use the the brute force method but to preprocess all your labeling layers and mask out the labels with holes in the large scale data set where the more detailed data comes on top. This is quite complicated to do,. so I prefer the third method with flushing the cache.</span></font></font></font></p>
<p><br></p>
<p>A fifth option to organize things is to use an approach like the "basemap example" (<a href="https://github.com/mapserver/basemaps">https://github.com/mapserver/basemaps</a>) to combine a lot of layers.</p>
<p><br>Have fun</p>
<p>Lars Schylberg</p>
<p><br></p>
<div dir="ltr" style="font-size: 13px; font-family: Lucida Console,Courier New,Courier,Monospace;">-----Originalmeddelande-----<br>> Från: "Andrea Peri" <<a href="mailto:aperi2007@gmail.com">aperi2007@gmail.com</a>><br>> Till: <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>> Datum: 2015-10-22 22:14<br>> Ämne: [mapserver-users] Using different datasets at different scales in the same layer<br>><br>> Hi,<br>><br>> Often we serve huge datasets in our wms services.<br>> To have a faster response, we usually done a secondary hidden layer<br>> with a simplified dataset and<br>> serve both using a group of two layers with complementary scales.<br>><br>> This allow the serve to use the simplified dataset for lower scale and<br>> detailed dataset for higher scales.<br>><br>> But this structure is boring and error prone to configure.<br>><br>> I guess more better should be if possible<br>> have one only layer and declare in it two distinct datasets.<br>> One for lower scale and the other for higher scale.<br>><br>> Is possible to do something like this in mapserver ?<br>><br>> Thx.<br>><br>> --<br>> -----------------<br>> Andrea Peri<br>> . . . . . . . . .<br>> qwerty àèìòù<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">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a>
</div>
<br><br><div class="signature"><div class="separator">--</div></div>
</div></body>