[MapProxy] Problems using transparent PNGs from mapproxy in mapproxy

Paul Norman penorman at mac.com
Tue Sep 4 01:14:26 PDT 2012


I've been having some ongoing problems getting a layer working that combines
two TMS layers where the original TMS layers have transparency and are
produced by mapproxy.

I eventually reduced it the following testcase (grids and a couple hundred
lines of unrelated config omitted). ### was either bc_gvrd_west_2009_tms or
sred. I cleared out the cache when switching.

layers:
- name: bc_mosaic
  title: BC Mosaic
  sources: [bc_mosaic_cache]
caches:
  bc_mosaic_cache:
    grids: [z20]
    sources: [bc_gvrd_east_2009_tms,###]
    format: image/png
    cache:
      type: file
      directory_layout: tms
sources:
  bc_gvrd_west_2009_tms:
    type: tile
    grid: z20
    transparent: true
    url: http://imagery.paulnorman.ca/tiles/11226.png
    coverage:
      polygons: 'wkt/bc_gvrd_west_2009.wkt'
      polygons_srs: 'EPSG:4326'
  sred:
    type: tile
    grid: z19
    transparent: true
    url: http://imagery.paulnorman.ca/tiles/sred.png

sred is an image where the south half is red and the north half is
transparent, created in GIMP.
11226 is an image pulled from mapproxy and copied to a location to serve
staticly.

When using sred, it correctly uses the transparency and the gvrd_east layer
can be seen in the north half. When using 11226 the gvrd_east layer cannot
be seen in the transparent parts of 11226.

I looked at the files with pngcheck and the only difference I can see that I
could imagine being relevant is that one is palleted and the other is 32-bit
RGB+alpha.

I believe the solution in my case is to switch from 8-bit to RGBA since I
didn't realize I was on 8-bit and want to switch away for quality reasons.



More information about the MapProxy mailing list