1

I am trying to view all road names when zoomed out at this projection in QGIS - ideally at a font size of about 2. I'd then like to export this as a PDF. Can this be done?

enter image description here

  • You want to see all those roads labeled at this scale? What size plot are you going to create ? (Big, I hope, as this will get cluttered). This is possible, but remember font size of '2' may mean something different on screen then when plotted out. Perhaps you want to create a Print Layout in QGIS to the exact size and scale of your final plot, then play around with a font size that will work at that scale for that amount of features. – DPSSpatial Jan 28 at 17:08
3

Sure, it is possible. I am not sure that this is exactly what you want, but maybe it will help you move in the right direction. You can (1) set up some labeling rules in the Layer Properties, then you will (2) use the Print Composer to set up your export at the proper scale.

1) Labeling rules

I added a vector lines layer of roads to QGIS. The layer must have a name attribute. I used the Layer Properties > Labels panel to set the labeling properties:

  • Show labels for this layer
  • Label with = 'name'
  • Text > Size = 2
  • Text > Type case = All uppercase
  • Placement > Parallel
    • note that according to a bug (https://issues.qgis.org/issues/2113), QGIS will not display ALL labels if you have chosen the "Curved" label placement and you zoom out. It will still export something if you choose Curved, although it doesn't render at all in the Print Composer... I suggest that you set everything up with "parallel" placement, then you can come back and play with the "curved" setting afterwards.
  • Placement > Allowed positions = On line
  • Placement > Repeat = 10 millimeter (if you want a label to repeat along a long line)
  • Rendering > Show all labels for this layer (including colliding labels)
  • Rendering > Show upside-down labels > always

label settings

Your labels will definitely collide if you are labeling all roads at 2 point font and viewing it at that scale (around 1:48,000).

enter image description here

2) Print Composer to export

Next, zoom in to a scale where the labels are not too crowded. I found that scale to be about 1:12000. Then set up a Print Composer:

  • open a new print composer and set up a page that is 39 x 27 inches (a large poster size)
  • add a map area that fills the page
  • set the map's scale to the "not too crowded" scale -- I used 12000.
  • use the "move item content" tool to position the map within the frame

print composer 1

Now the page should be ready to export using Composer > Export as PDF (or SVG). You can view the PDF result and zoom in until you can read the labels.

Remember that the repeat setting means that my labels are repeated along the lines. Now you can go back through the steps above and try changing labeling rules to refine your output.

PDF export:

PDF export - zoomed out

PDF zoomed in:

PDF export - zoomed in

I went back and changed the placement to "curved", and I like how the text flows, but it might not be rendering all of the labels with this setting: PDF export- zoomed in, curved labels

Hope this helps you.

| improve this answer | |
  • 1
    That bug is fixed - see github.com/qgis/QGIS/issues/12173 – ndawson Jan 28 at 20:28
  • Thank you! That's exactly what I need. Just playing around with those values now – Oli Sard Feb 6 at 16:33
  • Since following this guide I've struggled to work out the regularity of the words when zoomed out. Is there a way to make the repetition of the street names less regular once zoomed out, so essentially you see the road names as regular as you would on a regular (open street) map but looking at it from a distance. At the moment however the words are too clustered. Thanks so much in advance – Oli Sard Feb 14 at 14:53
  • @OliSard Maybe try changing the Placement > Repeat = 10 millimeter setting to a larger number, like 50 millimeters, and see if that helps. – cmrRose Sep 16 at 16:02

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.