<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=iso-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.Shkpostityyli17
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
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:72.0pt 72.0pt 72.0pt 72.0pt;}
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="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">By looking at the images it looks like the left one is 24-bit png while the right side image is quantized to 8-bit. There is something about “palette” in
<a href="http://mapproxy.org/docs/latest/configuration.html">http://mapproxy.org/docs/latest/configuration.html</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">“paletted<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"> Enable paletted (8bit) PNG images. It defaults to true for backwards compatibility. You should set this to false if you need 24bit PNG files. You can enable 8bit PNGs for single caches with a
custom format (colors: 256).”<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">-Jukka Rahkonen-<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Poul Kjeldager Sørensen 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">My first mail to this mailing this and a little new to this, so hoping it get to the right people.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><a href="http://ascendworkerweu.blob.core.windows.net/shares/quality_issue_mapproxy.png">http://ascendworkerweu.blob.core.windows.net/shares/quality_issue_mapproxy.png</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">In the image in the link I have shown the issue by comparing the images served by WMS and the original png files in the cache folder on disk. (using a GIS application to show boths).<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I have the following configuration, where I seeded tiles cache folders. I made two examples, one where the tile_size is larger than the other:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">layers:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> - name: tiles_to_wms<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> title: Tiles to WMS test<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> sources: [test_cache]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">caches:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> my_cache:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> sources: []<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> grids: [my_grid]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> meta_buffer: 0<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> meta_size: [1,1]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> format: image/png<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> cache_dir: "C:/ascend-vd/Sjaeland/11 - kbh-holbaek-lumaas"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> test_cache:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> sources: []<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> grids: [test_grid]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> format: image/png<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> cache_dir: "C:/ascend-vd/Sjaeland/11 - kbh-holbaek-lumaas"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">grids:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> my_grid:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> tile_size: [8192, 8192]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> bbox: [-1878007.03, 3932282.86, 832014.23, 9436480.79]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> res: [61.3423104 ,30.6711552,15.3355776,7.6677888,3.8338944,1.9169472,0.9584736,0.4792368,0.2396184,0.1198092,0.0599046]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> srs: 'EPSG:25832'<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> origin: sw<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> test_grid:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> tile_size: [2048, 2048]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> bbox: [-1878007.03, 3932282.86, 832014.23, 9436480.79]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> res: [61.3423104 ,30.6711552,15.3355776,7.6677888,3.8338944,1.9169472,0.9584736,0.4792368,0.2396184,0.1198092,0.0599046]<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> srs: 'EPSG:25832'<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> origin: sw<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I also modified the script to print out when it reads a file from disk and testing in the console:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Tile((20642, 18515, 10), source=None)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">C:/ascend-vd/Sjaeland/11 - kbh-holbaek-lumaas\test_cache_EPSG25832\10\000\020\642\000\018\515.png<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Tile((20643, 18515, 10), source=None)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">C:/ascend-vd/Sjaeland/11 - kbh-holbaek-lumaas\test_cache_EPSG25832\10\000\020\643\000\018\515.png<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Tile((20642, 18514, 10), source=None)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">C:/ascend-vd/Sjaeland/11 - kbh-holbaek-lumaas\test_cache_EPSG25832\10\000\020\642\000\018\514.png<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Tile((20643, 18514, 10), source=None)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">C:/ascend-vd/Sjaeland/11 - kbh-holbaek-lumaas\test_cache_EPSG25832\10\000\020\643\000\018\514.png<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">[info] 127.0.0.1 - - [03/Nov/2014 07:51:50] "GET /service?VERSION=1.1.1&SERVICE=WMS&REQUEST=GetMap&LAYERS=tiles_to_wms&FORMAT=image/png&STYLES=&SRS=EPSG:25<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">832&BBOX=654451.973,6203718.15,654620.003,6203814.286&WIDTH=2433&HEIGHT=1392&TRANSPARENT=TRUE HTTP/1.1" 200 –<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">If I used my other cache with larger tiles the quality is equal as the original data, but as seen below it also only loads one image and I am guessing its not doing anything other than cropping it:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">d-vd/Sjaeland/11 - kbh-holbaek-lumaas\my_cache_EPSG25832\10\000\005\160\000\004\628.png<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">27.0.0.1 - - [03/Nov/2014 08:02:56] "GET /service?VERSION=1.1.1&SERVICE=WMS&REQUEST=GetMap&LAYERS=tiles_to_wms&FORMAT=image/png&STYLES=&SRS=EPSG:25<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">=654450.487,6203719.192,654618.5,6203815.357&WIDTH=2432&HEIGHT=1392&TRANSPARENT=TRUE HTTP/1.1" 200 –<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Is there anyway that I can get my test_cache to work, without it lowering the quality of the served pngs.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
</div>
</body>
</html>