[MapProxy] Image quality
Matthias Kemker
b1-e at sags-per-mail.de
Mon Jan 3 10:57:35 PST 2022
Hi at all!
I’ve installed the latest kartoza/mapproxy docker image with Mapproxy 13.0 on my Ubuntu 20.04 Server.
(After I gave up to install Mapproxy 12.0 with apt-get install mapproxy on my Server. Problems with several libs…)
My problem is that the image/the map after handled by the mapproxy isn’t the same. Is there any way to optimize this?
I’ve tried to change png to jpeg on both sides (mapproxy and leaflet) an tried to use EPSG:3857 instead of EPSG:4326. And I've set jpeg_quality to 100.
In a other project I’ve used ProxySimplePHP, this script output the images 1:1.
In this case I can’t use it because the map server is an wms an not an wmts server.
Link to a screenshot from leaflet:
https://c.gmx.net/@327739385892044968/xK4ZZVIRQg2LBpGmKkaBFA
On the left side is the map direct from the map-server. And on the right side over the mapproxy.
Link to the map-server (dop):
http://www.geobasisdaten.niedersachsen.de/bestand?SERVICE=WMS&REQUEST=GetCapabilities&Format=application/vnd.ogc.xml
The leaflet Client:
var baseMapOrtho = L.tileLayer.wms("http://my-server:8080/wms", {
layers: 'dop20',
format: 'image/jpeg',
transparent: false,
srs:"EPSG:3857",
maxZoom: 21,
attribution: "Geobasis …"
});
Mapproxy config:
services:
demo:
wms:
layers:
- name: dop20
title: WMS layer from tiles
sources: [mycache]
caches:
mycache:
grids: [webmercator]
sources: [my_wms_source]
request_format: image/jpeg
sources:
my_wms_source:
type: wms
http:
ssl_no_cert_checks: True
req:
url: https://www.geobasisdaten.niedersachsen.de/doorman/noauth/wms_ni_dop
layers: dop20
transparent: false
grids:
webmercator:
base: GLOBAL_WEBMERCATOR
globals:
jpeg_quality: 100
best regards
Matthias Kemker
More information about the MapProxy
mailing list