[MapProxy] Force PNG24 on single cache
Oliver Tonnhofer
olt at omniscale.de
Wed May 13 04:31:32 PDT 2015
Hi Just,
please try the following:
services:
wms:
image_formats: ['image/jpeg', png8, png24]
…
globals:
image:
formats:
png8:
format: image/png
colors: 256
png24:
format: image/png; mode=24bit
colors: 0
It would be great if you could update the docs if that works.
Regards,
Oliver
--
Oliver Tonnhofer | Omniscale GmbH & Co KG | http://omniscale.com
OpenStreetMap WMS and tile services | http://maps.omniscale.com
> On 13.05.2015, at 12:38, Just van den Broecke <just at justobjects.nl> wrote:
>
> Hi Oliver,
>
> Was just posting when I saw your reply. Solved as follows:
>
> caches:
> opentopo_file_cache:
> grids: [geonovum_grid, opentopo_extent_grid]
> sources: [opentopo_wms]
> format: png8
>
> relief_struct_file_cache:
> grids: [geonovum_grid, opentopo_extent_grid]
> sources: [relief_struct_wms]
> format: png24
> .
> .
>
> globals:
> image:
> resampling_method: bilinear
> paletted: true # or false, see below
> formats:
> png24:
> format: image/png
> colors: 0
> png8:
> format: image/png
> colors: 256
> .
> .
>
> This setup allows to explicitly set either PNG8 or PNG24 per cache with PNG24 WMS-sources.
>
> Remaining issue is to let the client choose either PNG24 or PNG8 on the MapProxy WMS, like:
>
> wms:
> srs: ['EPSG:4326', 'EPSG:900913', 'EPSG:28992']
> image_formats: ['image/jpeg', 'image/png', 'image/png; mode=24bit']
>
> Though the latter does not seem to work. With the globals.image.paletted: true or false the MP WMS gives PNG8 or PNG24 repectively. Caches seem not affected by globals.image.paletted: true|false as long as the the above globals.image.formats.png8 or .png24 are set with each cache.
>
> But glad that the initial issue is solved and may be of help to others.
>
> Best,
>
> Just
>
>
> On 13-05-15 11:03, Oliver Tonnhofer wrote:
>> Hi Just,
>>
>> hard to tell with a complete configuration. But looking at the code it looks like MapProxy does not force an encoding to PNG24. It does this only for paletted image formats.
>>
>>
>> Regards,
>> Oliver
>>
>
>
>
> _______________________________________________
> MapProxy mailing list
> MapProxy at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapproxy
More information about the MapProxy
mailing list