Bug report #17239

Updated by Jürgen Fischer almost 4 years ago

I first noticed this when trying to match up screenshots taken off of Google Maps, OpenStreetMap, and Mapzen with screenshots out of my QGIS project.

When referencing http://kelsocartography.com/blog/?p=2407 I can see web map zoom 5 is 1:18,489,297 map scale.

When I type that scale into the QGIS document I instead get something that is NOT at that zoom. It should be exactly zoom 5 and 1:18,489,297 map scale.

I can **always** fix this by scaling the QGIS screenshot up by 133%. That fraction reminded me of 96/72. I remember way back in Windows 95 days that OS used a pixels per inch (ppi) of 96 while most everyone else uses 72 ppi.

But when I set my scale to 1:13,901,727 instead for zoom 5 (applying the 133% ratio) then they match up correctly!

Tom Chadwin @tomchadwin looked into this on Gitter and suggests that 96DPI is being suggested as a default in a bunch of places, but didn't know enough to investigate further:

https://github.com/qgis/QGIS/search?utf8=%E2%9C%93&q=96+dpi&type=

I suspect there may be other HiDPI issues at play here (as Anita Graser @anitagraser points to): #11103 https://issues.qgis.org/issues/11103

But since the map scale is fundamentally broken and a critical part of "truth" in mapping, this seems like an important piece to track separately.

For instance, I already enable the QGIS app to run into HiDPI already by toggling the Finder bit to force it to run in HiDPI and it works fine. It's not a 72 ppi versus 144 ppi issue, it's the bad math with 96 ppi.

Please let me know if I can add additional details :) I use QGIS daily and it's a pleasure to use, keep up the good work!

Back