[MapProxy] Quality Issue with PNGs from cache

Poul Kjeldager Sørensen pks at ascend.xyz
Mon Nov 3 04:12:14 PST 2014


Thanks. That was it.

Works fine now.

From: Rahkonen Jukka (Tike) [mailto:jukka.rahkonen at mmmtike.fi]
Sent: Monday, November 3, 2014 11:15 AM
To: Poul Kjeldager Sørensen; 'mapproxy at lists.osgeo.org'
Subject: Re: Quality Issue with PNGs from cache

Hi,

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 http://mapproxy.org/docs/latest/configuration.html

"paletted
    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)."

-Jukka Rahkonen-

Poul Kjeldager Sørensen wrote:

My first mail to this mailing this and a little new to this, so hoping it get to the right people.

http://ascendworkerweu.blob.core.windows.net/shares/quality_issue_mapproxy.png

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).

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:


layers:
  - name: tiles_to_wms
    title: Tiles to WMS test
    sources: [test_cache]
caches:
  my_cache:
   sources: []
   grids: [my_grid]
   meta_buffer: 0
   meta_size: [1,1]
   format: image/png
   cache_dir: "C:/ascend-vd/Sjaeland/11 - kbh-holbaek-lumaas"
  test_cache:
   sources: []
   grids: [test_grid]
   format: image/png
   cache_dir: "C:/ascend-vd/Sjaeland/11 - kbh-holbaek-lumaas"
grids:
  my_grid:
    tile_size: [8192, 8192]
    bbox: [-1878007.03, 3932282.86, 832014.23, 9436480.79]
    res: [61.3423104 ,30.6711552,15.3355776,7.6677888,3.8338944,1.9169472,0.9584736,0.4792368,0.2396184,0.1198092,0.0599046]
    srs: 'EPSG:25832'
    origin: sw

  test_grid:
    tile_size: [2048, 2048]
    bbox: [-1878007.03, 3932282.86, 832014.23, 9436480.79]
    res: [61.3423104 ,30.6711552,15.3355776,7.6677888,3.8338944,1.9169472,0.9584736,0.4792368,0.2396184,0.1198092,0.0599046]
    srs: 'EPSG:25832'
    origin: sw

I also modified the script to print out when it reads a file from disk and testing in the console:

Tile((20642, 18515, 10), source=None)
C:/ascend-vd/Sjaeland/11 - kbh-holbaek-lumaas\test_cache_EPSG25832\10\000\020\642\000\018\515.png
Tile((20643, 18515, 10), source=None)
C:/ascend-vd/Sjaeland/11 - kbh-holbaek-lumaas\test_cache_EPSG25832\10\000\020\643\000\018\515.png
Tile((20642, 18514, 10), source=None)
C:/ascend-vd/Sjaeland/11 - kbh-holbaek-lumaas\test_cache_EPSG25832\10\000\020\642\000\018\514.png
Tile((20643, 18514, 10), source=None)
C:/ascend-vd/Sjaeland/11 - kbh-holbaek-lumaas\test_cache_EPSG25832\10\000\020\643\000\018\514.png
[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
832&BBOX=654451.973,6203718.15,654620.003,6203814.286&WIDTH=2433&HEIGHT=1392&TRANSPARENT=TRUE HTTP/1.1" 200 -

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:

d-vd/Sjaeland/11 - kbh-holbaek-lumaas\my_cache_EPSG25832\10\000\005\160\000\004\628.png
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
=654450.487,6203719.192,654618.5,6203815.357&WIDTH=2432&HEIGHT=1392&TRANSPARENT=TRUE HTTP/1.1" 200 -



Is there anyway that I can get my test_cache to work, without it lowering the quality of the served pngs.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20141103/2582ed88/attachment.html>


More information about the MapProxy mailing list