1

I have my map at a scale where the OSMM background map is not showing the street names. Is there a way to make the street names visible without changing the scale of my map (can't increase scale as showing a city boundary, and cannot increase size of page as needs to be printed off at A2)?

2
  • where are you loading the WMS from? you may be able to change the style or pass in a a DPI setting – Ian Turton Feb 22 at 8:37
  • Hi Ian, thanks for the reply. I'm loading it from emapsite.com – GDP Feb 22 at 11:14
2

Your difficulty likely arises from QGIS and the server not communicating well about the dpi (dots per inch) resolution of the map requested from the server.

Many WMS servers default to 90 or 96 dpi. Many computer screens operate at a "logical" (i.e., used for calculating display font sizes in all applications) of 96 or 120 dpi. These are fairly close to each other, so the fonts are rendered in the map on screen legibly, perhaps very slightly smaller than ideal.

When you print a layout, you're likely using a much finer dpi, say 300. If QGIS is able to communicate with the server as to this dpi, you get back a good map with labels rendered at the right size. When not, the server renders labels as if the map were to be printed at 96dpi (or whatever the server default it) and so the fonts are 3X smaller than they out to be.

There are a couple of ways to deal with this:

  1. Switch to using a background map from a different source. Great candidates are vector tiles, as available from MapTiler, or (if you are an ArgGis subscriber) from ESRI's Vector Tiles Group (this link may be ephemeral), which you can load in QGIS. They do not have this issue. Alternatively, find a different WMS map or a different WMS server that does parse the dpi instructions in the format QGIS sends them better.

  2. Fiddle with the datasource URI for your WMS layer to pass different dpiMode settings. Different server programs use different ways of communicating dpi; you may luck into the right setting. See WMS dpiMode setting. dpiMode=7 tries passing target DPI all possible ways.

  3. Set the output dpi of your layout to 96 or 120. This will make for a coarser printed map, of course, but the background map including labels will be right. This tradeoff may or may not be suitable for your use case, but this is definitely the quickest fix.

  4. Export a local copy of the basemap at the right dpi, and use that in your map overall (or at least in the layout). QGIS will then print other layers at a finer dpi and they will look smoother, but this layer at the dpi you chose, including right-sized fonts.

To do #4, you will need to do a bit of manual calculation. When you right click the WMS layer and select Export, make sure Create VRT is unchecked. You will need to specify the resolution (in map units per pixel) that you want. You'll need to derive that from the scale and target dpi of your layout. Example: If your layout is 1:10000 (for example) and target dpi is 120, that means the "dots per meter" is 39.37 inches / m * 120 = 4764 "dpm". The target resolution is then 10000/4764=2.099 metres.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.