2

In QGIS 3.4, I am using the Print Layout to print some UTM lines with scale bars. My goal is to make a PDF of a map that is at 1:63360 or 1 inch to the mile.

When I print the PDF, the mile Scale Bar does not measure out to be one full inch. I have ensured that I am not introducing scaling during the print rendering; that is, I print at 100% scale from AirPrint in the macOS Preview.

Other useful Info

Edit — Root cause found

The problem arose because I copy/pasted the legend from Map A to Map B. My guess is when pasting the new legend object into Map B preserved the scale from Map A.

  • I have added three Scale Bars to the layout that appear to be working as expected.
    1. Km - Single Box, colored in yellow
    2. Miles - Line Ticks, in black
    3. Numeric, which shows the scale ratio — 1:63360
  • Importing the PDF into GIMP and setting the resolution to 300 yields these measurement
    • Km is 220 px at 300 dpi = 0.73" when printed
    • Miles is 360 px at 300 dpi = 1.2" when printed already wrong
    • But, the ratio of 360 px for 1 mile to 220 px for 1 Km or 360/220 is approximately 1.6. Therefore, the Scale Bar are correct when generated from QGIS. The measurement errors in pixels is due to me drawing a line in GIMP, so I'm not too worried about that difference.
  • I've tried the following projections which both yield similar errors of one mile not equal to 1"
    • epsg:3857
    • epsg:32611 (WGS 84 / UTM zone 11N). The UTM data and the rest of the map is from this UTM zone.

GIMP measurements

5
  • 1
    Can you Export as PDF instead of Print it? Jan 19, 2019 at 0:36
  • My apologies, I left that out: In QGIS I already Export as PDF..., then I open the PDF in macOS Preview. I can also open it in GIMP to do the measurements.
    – RobLabs
    Jan 19, 2019 at 0:48
  • 1
    Measure the PDF exported by QGIS, I reproduce you procedure and the label measures 300px. The Scalebar item has a Label unit multipier, make sure that it is set to 1. Jan 19, 2019 at 2:51
  • the scale for EPSG:3857 and UTM are only "correct" at the equator, I assume you are working further north?
    – Ian Turton
    Jan 19, 2019 at 10:24
  • 2
    @IanTurton, that is not entirely true in UTM. Along the central meridian, the deformation is smaller than at the equator. However, the observation is very good. The scale of a map is expected to express the relationship between the projection coordinate system and the paper, the difference between the coordinate system and reality is another thing. What makes me think about how QGIS interprets its scale factor, and what will be the coordinate system that has been assigned to the map item. Jan 19, 2019 at 11:49

1 Answer 1

3

Based on @Gabriel De Luca being able to reproduce the PDF without my same issues, I had hope that I was doing something wrong on my end.

My original QGIS Print Layout would only create a 1 mile scale bar that was 360 px at 300 DPI, when it should be 300 px for the intended scale of 1:63360 (1 in = 1 mile).

I created a new QGIS Print Layout, with following settings and it worked as expected. The only thing that I can think of what went wrong was that my first Print Layout had become corrupted, and it carried the error forward.

  • Project CRS is EPSG:32611
  • In Print Layout, Map CRS is set to Use project CRS
  • Add and style Scale Bars for 1 Km and 1 mi
  • In QGIS, Export as PDF or I could have used Export as Image, with resolution set to 300 dpi
  • Measure the width of the 1 mile scale bar in GIMP
  • 1 inch in pixels should be 300 pixels wide.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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