<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;}
@font-face
        {font-family:"Lucida Console";
        panose-1:2 11 6 9 4 5 4 2 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;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
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 Lars,<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 had not tried that myself but did some tests now. I do not really see any difference in the output  with any values
 of gamma. Perhaps it is broken.<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 have been thinking that one of the most common use cases is to draw adjacent polygons with just fill but no outlines
 so that the whole area gets unique color even when the fill has some transparency set in STYLE with somehow like<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">     CLASS<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">        NAME "polygon_test"<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">        STYLE<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">        COLOR 100 50 0<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">        OPACITY 50<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">        END<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">     END<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 am not sure if this test makes sense and I know that I can get rid of the borders between the polygons by using COMPOSITE-OPACITY
 at the LAYER level.<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">When GD renderer was removed the support to render without anti-aliasing was recognized as a good feature http://mapserver.org/development/rfc/ms-rfc-99.html<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;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"><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"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Lähettäjä:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> mapserver-users [mailto:mapserver-users-bounces@lists.osgeo.org]
<b>Puolesta </b>lars.schylberg@blixtmail.se<br>
<b>Lähetetty:</b> 18. lokakuuta 2017 15:05<br>
<b>Vastaanottaja:</b> mapserver-users@lists.osgeo.org<br>
<b>Aihe:</b> Re: [mapserver-users] Draw roads WITHOUT anti-aliasing<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p style="margin:0cm;margin-bottom:.0001pt">Hi,<o:p></o:p></p>
<p style="margin:0cm;margin-bottom:.0001pt"><o:p> </o:p></p>
<p style="margin:0cm;margin-bottom:.0001pt">I did some quick tests with :<o:p></o:p></p>
<p style="margin:0cm;margin-bottom:.0001pt"><o:p> </o:p></p>
<p style="margin:0cm;margin-bottom:.0001pt">  OUTPUTFORMAT<br>
    NAME "png_G0"<br>
    DRIVER AGG/PNG<br>
    MIMETYPE "image/png"<br>
    IMAGEMODE RGB<br>
    EXTENSION "png"<br>
    FORMATOPTION "GAMMA=0.0"<br>
  END<o:p></o:p></p>
<p style="margin:0cm;margin-bottom:.0001pt"><o:p> </o:p></p>
<p style="margin:0cm;margin-bottom:.0001pt">and shp2img with options -i<o:p></o:p></p>
<p style="margin:0cm;margin-bottom:.0001pt">eg: shp2img -m 01_polygon_td_poly.map -o 01_polygon_td_poly.png -i png_G0<o:p></o:p></p>
<p style="margin:0cm;margin-bottom:.0001pt"><o:p> </o:p></p>
<p style="margin:0cm;margin-bottom:.0001pt">I did some tests with both polygons, polygon outlines and lines and they all seems to have anti-aliasing as far as I could see.<o:p></o:p></p>
<p style="margin:0cm;margin-bottom:.0001pt">Would this be an ok way to test it?  I also have some people that would like to do lines without anti-aliasing for a strange reason.<o:p></o:p></p>
<p style="margin:0cm;margin-bottom:.0001pt"><o:p> </o:p></p>
<p style="margin:0cm;margin-bottom:.0001pt">Lars Schylberg<o:p></o:p></p>
<p style="margin:0cm;margin-bottom:.0001pt"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Lucida Console"">-----Originalmeddelande-----<br>
> Från: "Rahkonen Jukka (MML)" <<a href="mailto:jukka.rahkonen@maanmittauslaitos.fi">jukka.rahkonen@maanmittauslaitos.fi</a>><br>
> Till: "Eichner, Andreas - SID" <<a href="mailto:Andreas.Eichner@sid.sachsen.de">Andreas.Eichner@sid.sachsen.de</a>>, "Erik H" <<a href="mailto:erik.h11.01@gmail.com">erik.h11.01@gmail.com</a>><br>
> Kopia: <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
> Datum: 2017-10-18 11:13<br>
> Ämne: Re: [mapserver-users] Draw roads WITHOUT anti-aliasing<br>
><br>
> Hi,<br>
><br>
> I suppose that the amount of antialiasing with AGG is set with "gamma" parameter.  Mapserver supports that at least for polygons as documented in
<a href="http://www.mapserver.org/mapfile/outputformat.html">http://www.mapserver.org/mapfile/outputformat.html</a> but you could try if using gamma=0.0 has an effect on lines as well. It may be that it does not because search<br>
> <a href="https://github.com/mapserver/mapserver/search?utf8=%E2%9C%93&q=gamma&type=">
https://github.com/mapserver/mapserver/search?utf8=%E2%9C%93&q=gamma&type=</a><br>
> seems to find only something that is tied to polygon outlines<br>
> <a href="https://github.com/mapserver/mapserver/blob/branch-7-0/renderers/agg/include/agg_renderer_outline_aa.h">
https://github.com/mapserver/mapserver/blob/branch-7-0/renderers/agg/include/agg_renderer_outline_aa.h</a><br>
><br>
><br>
> If gamma does not work for lines then it could be worth making a feature request for adding a new formatoption "GAMMA_LINE=[].<br>
><br>
> Couple of Mapnik links dealing with the same issue:<br>
> <a href="http://gis.19327.n8.nabble.com/Turning-off-anti-aliasing-td5339458.html">
http://gis.19327.n8.nabble.com/Turning-off-anti-aliasing-td5339458.html</a><br>
> <a href="http://mapnik.org/mapnik-reference/#3.0.6/line-gamma-method">http://mapnik.org/mapnik-reference/#3.0.6/line-gamma-method</a><br>
><br>
> -Jukka Rahkonen-<br>
><br>
><br>
><br>
> -----Alkuperäinen viesti-----<br>
> Lähettäjä: mapserver-users [mailto:<a href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a>] Puolesta Eichner, Andreas - SID<br>
> Lähetetty: 18. lokakuuta 2017 9:57<br>
> Vastaanottaja: Erik H <<a href="mailto:erik.h11.01@gmail.com">erik.h11.01@gmail.com</a>><br>
> Kopio: <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
> Aihe: Re: [mapserver-users] Draw roads WITHOUT anti-aliasing<br>
><br>
> Damn... missed attaching the images.<br>
><br>
> > -----Ursprüngliche Nachricht-----<br>
> > Von: mapserver-users [mailto:<a href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a>]<br>
> > Im Auftrag von Eichner, Andreas - SID<br>
> > Gesendet: Mittwoch, 18. Oktober 2017 08:28<br>
> > An: Erik H<br>
> > Cc: <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
> > Betreff: Re: [mapserver-users] Draw roads WITHOUT anti-aliasing<br>
> ><br>
> > Hi,<br>
> ><br>
> > I just meant that it seems to be pretty easy to implement aliased<br>
> > rendering with AGG.<br>
> > Simply changing the typedef in line 91 of mapagg.cpp from<br>
> ><br>
> >   typedef mapserver::renderer_scanline_aa_solid<renderer_base><br>
> > renderer_scanline;<br>
> ><br>
> > to<br>
> ><br>
> >   typedef mapserver::renderer_scanline_bin_solid<renderer_base><br>
> > renderer_scanline;<br>
> ><br>
> > turns of anti-aliased rendering. I've attached the output of "shp2img<br>
> > -m line_simple.map" from the msautotests.<br>
> > An additional member in class AGG2Renderer for the aliased rasterizer<br>
> > and conditionally passing one or the other to render_scanlines()<br>
> > depending on some value of strokeStyleObj might be enough.<br>
> ><br>
> > Regards<br>
> ><br>
> > > -----Ursprüngliche Nachricht-----<br>
> > > Von: Erik H [mailto:<a href="mailto:erik.h11.01@gmail.com">erik.h11.01@gmail.com</a>]<br>
> > > Gesendet: Dienstag, 17. Oktober 2017 17:34<br>
> > > An: Eichner, Andreas - SID<br>
> > > Cc: Richard Greenwood; <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
> > > Betreff: Re: [mapserver-users] Draw roads WITHOUT anti-aliasing<br>
> > ><br>
> > > As for Andreas' remark about 'simply the use of another scanline<br>
> > > rasterizer.' - I'm sorry but I'm not much of a C++ developer. If I<br>
> > have<br>
> > > to do rasterizing, I'd skip MapServer altogether and generate the<br>
> > > PNG<br>
> > in<br>
> > > Java.<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="https://lists.osgeo.org/mailman/listinfo/mapserver-users">https://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="https://lists.osgeo.org/mailman/listinfo/mapserver-users">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a>
<o:p></o:p></span></p>
</div>
<p style="margin:0cm;margin-bottom:.0001pt"><o:p> </o:p></p>
<p style="margin:0cm;margin-bottom:.0001pt"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">--<o:p></o:p></p>
</div>
<p class="MsoNormal"><br>
 <o:p></o:p></p>
</div>
</div>
</div>
</body>
</html>