[MapProxy] difference between screen and print

Rahkonen Jukka (MML) jukka.rahkonen at maanmittauslaitos.fi
Thu Sep 20 07:33:07 PDT 2018


The reason for your issue is that paper prints have better resolution than computer screens. If you print what you see on the screen directly on paper it would look coarse. For compensating this QGIS makes different call and asks for more pixels for printing.  Pixels are squeezed to fill the same area and thus the resolution gets better. As a side effect of squeezing lines get thinner and texts get smaller, but the &dpi=300 parameter compensates that by making the server to render the map with wider lines and bigger symbols and labels.  This does not work with tile cache because tiles are not dynamic. So if you want to print at scale that is corresponding to zoom level 8 then bigger amount of tiles is requested from zoom level 9 or even 10, squeezed, and the result is what you have seen.  You may notice that the styles are changing as well because higher zoom levels have more details on the map.

There is nothing you can do on the MapProxy side, despite perhaps configuring one tile matrix for the screen and another one to be used for high quality printing.

If I remember right QGIS has an option to select the level of oversampling. By setting the level to zero you should get right size for your labels but coarse appearance for the map in general.

-Jukka Rahkonen-

-----Alkuperäinen viesti-----
Lähettäjä: MapProxy [mailto:mapproxy-bounces at lists.osgeo.org] Puolesta Hälßig, Frank
Lähetetty: 19. syyskuuta 2018 12:43
Vastaanottaja: mapproxy at lists.osgeo.org
Aihe: [MapProxy] difference between screen and print

Dear list,

I have a strange behavior by using mapproxy and hope you can help me.
I use 2 layers (Flurstueck,Flurstuecksnummer) of a public WMS (https://geodienste.sachsen.de/wms_geosn_flurstuecke/guest?).
For testing purposes I used Q-GIS 2.8 (Ubuntu 16.04) and Q-GIS 3.0 (Win8.1). Mapproxy runs under Ubuntu 16.04.
At the screen everything works fine, but when I printout a map to pdf, the cadastral numbers are to small  (https://www.haelssig.net/temp/mapproxy/wur_mp.pdf)

Using the WMS direct in Q-GIS the printout to pdf is OK (https://www.haelssig.net/temp/mapproxy/wur_orig.pdf)

I tried MapProxy with cache  and direct source, the result ist the same.
When running MapProxy in develop mode I can see an extra parameter (&dpi=300) in the request for the print .
I have the same effect when using http://www.geoproxy.geoportal-th.de/geoproxy/services/INSPIREcp? .

How to start troubleshooting ?

Configuration is as followed:

    bbox_srs: 'EPSG:25833'
    bbox: [269041,5551098,509220,5740594]
    srs: 'EPSG:25833'

  - name: Flurstuecke
    title: 'Flurstuecke'
    sources: [sn_fst_cache]

    grids: [sachsen]
    sources: ['sn_gmk_wms:Flurstueck,Flurstuecksnummer']

    type: wms
      version: 1.3.0        
     url: https://geodienste.sachsen.de/wms_geosn_flurstuecke/guest? 
     layers: Flurstueck,Flurstuecksnummer,Gemarkung,Gemarkungsname
     supported_srs: 'EPSG:25833'
        srs: 'EPSG:25833'
        bbox: [276384, 5560720, 504054, 5728100]
      ssl_no_cert_checks: True
      transparent_color: '#FFFFFF'
      transparent_color_tolerance: 0

Best regards,
Frank Hälßig
without disclaimer
MapProxy mailing list
MapProxy at lists.osgeo.org

More information about the MapProxy mailing list