<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:14px"><div id="yiv9769988463"><div id="yui_3_16_0_ym19_1_1485107109870_81372"><div style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:14px;" id="yui_3_16_0_ym19_1_1485107109870_81371"><div id="yiv9769988463"><div id="yiv9769988463yui_3_16_0_ym19_1_1485107109870_77395"><div id="yiv9769988463yui_3_16_0_ym19_1_1485107109870_77394" style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:14px;"><div id="yiv9769988463"><div id="yiv9769988463yui_3_16_0_ym19_1_1485107109870_69278"><div id="yiv9769988463yui_3_16_0_ym19_1_1485107109870_69277" style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:14px;"><div id="yiv9769988463yui_3_16_0_ym19_1_1485107109870_38784">Thank you for the replies.</div><div id="yiv9769988463yui_3_16_0_ym19_1_1485107109870_38784"><br clear="none"></div><div id="yiv9769988463yui_3_16_0_ym19_1_1485107109870_38783">     This means that regardless of the layer's CLASS hierachy, the attributes will be rendered according to the sorting rule, which is predefined in your data. If the data are not sorted in advance, the rendering will never be right. Correct?  </div><div dir="ltr" id="yiv9769988463yui_3_16_0_ym19_1_1485107109870_38783">If this is the case, then  +1 for the sortshp. It worked out well in my mapfile and roads are rendered properly.</div><div class="yiv9769988463qtdSeparateBR" dir="ltr" id="yiv9769988463yui_3_16_0_ym19_1_1485107109870_69279">    However it appears that in PostGIS data,  the sorting happens in the DATA section of the mapfile, and the data need not  be pre-sorted. It works this way here, at least with the following rule:</div><div class="yiv9769988463qtdSeparateBR" dir="ltr" id="yiv9769988463yui_3_16_0_ym19_1_1485107109870_69279">              DATA 'geom from (SELECT * FROM roads ORDER BY category desc) AS foo using unique id using srid=2100'</div><div class="yiv9769988463qtdSeparateBR" dir="ltr" id="yiv9769988463yui_3_16_0_ym19_1_1485107109870_69279">   On the other hand, I didn't quite catch the z-index part in Simon's tutorial. I don't have have z values...</div><div class="yiv9769988463qtdSeparateBR" dir="ltr" id="yiv9769988463yui_3_16_0_ym19_1_1485107109870_69279">    </div><div class="yiv9769988463qtdSeparateBR" dir="ltr" id="yiv9769988463yui_3_16_0_ym19_1_1485107109870_69279">I'm also curious for one more thing.  As more as I zoom in on my map, the roads are getting smaller instead of getting bigger. Imagine a highway looking pretty wide and as you zoom in the width is reducing. I've only set color and width in STYLE object of my mapfile.   Am I missing any configuration ?  </div><div class="yiv9769988463qtdSeparateBR" id="yiv9769988463yui_3_16_0_ym19_1_1485107109870_69279"><br clear="none"></div></div></div></div></div></div></div></div></div><title></title><div id="yui_3_16_0_ym19_1_1485107109870_81383"><div id="yiv9769988463yui_3_16_0_ym19_1_1485107109870_77411"><div id="yiv9769988463yui_3_16_0_ym19_1_1485107109870_69287"><div class="yiv9769988463qtdSeparateBR" id="yiv9769988463yui_3_16_0_ym19_1_1485107109870_77410"><br clear="none"><br clear="none"></div><div class="yiv9769988463yqt5417038234" id="yiv9769988463yqt45695"><div class="yiv9769988463yqt4251906389" id="yiv9769988463yqt97896"><div class="yiv9769988463yqt6803540903" id="yiv9769988463yqt38304"><div id="yiv9769988463yui_3_16_0_ym19_1_1485107109870_69286"><div class="yiv9769988463iw_mail" dir="ltr" id="yiv9769988463yui_3_16_0_ym19_1_1485107109870_69285">
<div dir="ltr" id="yiv9769988463yui_3_16_0_ym19_1_1485107109870_69284" style="margin:0;">This blog entry from Simon Mercier describes how this works.</div>
<div dir="ltr" id="yiv9769988463yui_3_16_0_ym19_1_1485107109870_69356" style="margin:0;"><br clear="none"></div>
<div dir="ltr" id="yiv9769988463yui_3_16_0_ym19_1_1485107109870_69353" style="margin:0;"><a rel="nofollow" shape="rect" id="yiv9769988463yui_3_16_0_ym19_1_1485107109870_69352" target="_blank" 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></div>
<div dir="ltr" id="yiv9769988463yui_3_16_0_ym19_1_1485107109870_69354" style="margin:0;"><br clear="none"></div>
<div dir="ltr" id="yiv9769988463yui_3_16_0_ym19_1_1485107109870_69355" style="margin:0;">Lars S.</div>
<div dir="ltr" id="yiv9769988463yui_3_16_0_ym19_1_1485107109870_74123" style="margin:0;"><br clear="none"></div>
<div dir="ltr" id="yiv9769988463yui_3_16_0_ym19_1_1485107109870_74124" style="font-size:13px;font-family:Lucida Console, Courier New, Courier, Monospace;">-----Originalmeddelande-----<br clear="none">> Från: "Stephen Woodbridge" <<a rel="nofollow" shape="rect" ymailto="mailto:woodbri@swoodbridge.com" target="_blank" href="mailto:woodbri@swoodbridge.com">woodbri@swoodbridge.com</a>><br clear="none">> Till: <a rel="nofollow" shape="rect" ymailto="mailto:mapserver-users@lists.osgeo.org" target="_blank" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br clear="none">> Datum: 2017-01-22 05:35<br clear="none">> Ämne: Re: [mapserver-users] Mapfile CLASS hierarchy<br clear="none">><br clear="none">> Oh, and I forgot to mention that if you want objects rendered in a<br clear="none">> particular order, then your should sort the data in the sources in that<br clear="none">> order. You can do this with order by clause on SQL based data sources<br clear="none">> and using shpsort for shapefiles, ogr2ogr and also sort data.<br clear="none">><br clear="none">> On 1/21/2017 10:03 PM, Stephen Woodbridge wrote:<br clear="none">> > Within a layer objects are always drawn in the order they are delivered<br clear="none">> > from the datasource. Think of the CLASSes are an IF-ELSEIF-BLOCK, when<br clear="none">> > an object is presented each CLASS is tested and the first one the<br clear="none">> > accepts the object renders it.<br clear="none">> ><br clear="none">> > I often up a default class at then end that has no expression ans render<br clear="none">> > it in red just so I can see if I missed any cases, but remove it when<br clear="none">> > I'm done developing the mapfile.<br clear="none">> ><br clear="none">> > -Steve W<br clear="none">> ><br clear="none">> > On 1/21/2017 8:48 PM, Stefanos Anastasiou wrote:<br clear="none">> >> Hi list,<br clear="none">> >>    according to the documentation, the first layer in the mapfile is<br clear="none">> >> drawn first, and the second is drawn on top of that and so on... I was<br clear="none">> >> wondering if the same principle applies to the CLASS object as well. For<br clear="none">> >> example: I have a "Roads" layer stored in PostGIS with a "Category"<br clear="none">> >> column representing the different types of roads. So a category 3 is<br clear="none">> >> very small roads, category 2 is city roads, 1 is major roads and 0 is<br clear="none">> >> highways and on the same layers I create four CLASS objects with<br clear="none">> >> different styles for each Road category. But regardless the order of the<br clear="none">> >> classes (either I draw the small roads first or the highways) the same<br clear="none">> >> effect insists: the small roads are drawn over the highways.    So what<br clear="none">> >> is the solution here? Create different layers of the same dataset<br clear="none">> >> representing the various values of the "Category" column ??<br clear="none">> >><br clear="none">> >><br clear="none">> >> Regards,<br clear="none">> >> -Stefanos<br clear="none">> >><br clear="none">> >><br clear="none">> >> _______________________________________________<br clear="none">> >> mapserver-users mailing list<br clear="none">> >> <a rel="nofollow" shape="rect" ymailto="mailto:mapserver-users@lists.osgeo.org" target="_blank" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br clear="none">> >> <a rel="nofollow" shape="rect" target="_blank" href="https://lists.osgeo.org/mailman/listinfo/mapserver-users">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br clear="none">> >><br clear="none">> ><br clear="none">> ><br clear="none">> > ---<br clear="none">> > This email has been checked for viruses by Avast antivirus software.<br clear="none">> > <a rel="nofollow" shape="rect" target="_blank" href="https://www.avast.com/antivirus">https://www.avast.com/antivirus</a><br clear="none">> ><br clear="none">> > _______________________________________________<br clear="none">> > mapserver-users mailing list<br clear="none">> > <a rel="nofollow" shape="rect" ymailto="mailto:mapserver-users@lists.osgeo.org" target="_blank" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br clear="none">> > <a rel="nofollow" shape="rect" target="_blank" href="https://lists.osgeo.org/mailman/listinfo/mapserver-users">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br clear="none">><br clear="none">><br clear="none">> ---<br clear="none">> This email has been checked for viruses by Avast antivirus software.<br clear="none">> <a rel="nofollow" shape="rect" target="_blank" href="https://www.avast.com/antivirus">https://www.avast.com/antivirus</a><br clear="none">><br clear="none">> _______________________________________________<br clear="none">> mapserver-users mailing list<br clear="none">> <a rel="nofollow" shape="rect" ymailto="mailto:mapserver-users@lists.osgeo.org" target="_blank" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br clear="none">> <a rel="nofollow" shape="rect" target="_blank" href="https://lists.osgeo.org/mailman/listinfo/mapserver-users">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a>
</div>
<div dir="ltr" style="margin:0;"><br clear="none"></div>
<div dir="ltr" style="margin:0;"><br clear="none"></div>
<div class="yiv9769988463signature"><div class="yiv9769988463separator">--</div></div>
</div></div></div></div></div>
<br clear="none">_______________________________________________<br clear="none">mapserver-users mailing list<br clear="none"><a rel="nofollow" shape="rect" ymailto="mailto:mapserver-users@lists.osgeo.org" target="_blank" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br clear="none"><a rel="nofollow" shape="rect" target="_blank" href="https://lists.osgeo.org/mailman/listinfo/mapserver-users">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br clear="none"><br clear="none">     </div><div> <div style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:14px;"> <div style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;"> <div dir="ltr"><font size="2" face="Arial"> Στις 12:25 μ.μ. Κυριακή, 22 Ιανουαρίου 2017, ο/η "lars.schylberg@blixtmail.se" <lars.schylberg@blixtmail.se> έγραψε:<br clear="none"></font></div>  <br clear="none"><br clear="none"> <div class="yiv9769988463y_msg_container"><div id="yiv9769988463"></div></div></div></div></div></div></div></div></div></body></html>