# How is scale for print composer calculated?

Not really an issue, more of a theoretical/technical question.

I'm doing regional maps with over 1500 km difference (~10 degrees of latitude) between lower/upper border of the map, and I noticed that scale in print composer is fixed and does not change if you move scalebar within composer. So how is it calculated? Is it taking an average scale of the referenced map? A 100 km section(length) of the scalebar on the south would only equal ~80(?) km if moved to the north.

• What coordinate system is your map set to? Commented Jun 29, 2018 at 1:18
• UTM, but most projections would distort distances too. Commented Jun 29, 2018 at 15:40
• You could test this by adding new maps to the composer. Each map should be the full width of your main map, but with a narrow vertical extent. Make one map that shows the same area as the top of your map, one that shows the middle of the map, and one that shows the bottom. Add a scale bar to each map, and compare.
– csk
Commented Jun 29, 2018 at 17:45
• The scale bar in the map canvas doesn't change with latitude. In WGS84, with my map extent just north of Antarctica, the scale bar says 4000 miles but the same length with the measurement tool is 2451 miles.
– csk
Commented Jun 29, 2018 at 17:59
• Maps that use a distance-distorting projection and span a wide range of latitudes will be misleading in terms of portrayed scale. This isn't unique to QGIS. It would be appropriate to omit the scale bar for such a map. Alternatively, you could use multiple smaller maps to cover the area, each with its own scalebar.
– csk
Commented Jun 29, 2018 at 19:19

Here you can see a series of maps I produced, all at the same scale according to the map Item Properties.

Maps are in CRS EPSG 3857, scale (according to Item Properties) is 50,000,000, base map is Esri National Geographic. All scale bars are 2000 km long.

(Sorry about the poor image quality. I repeatedly encountered a bug with exporting from the print composer, and eventually gave up and took a screenshot.)

Conclusion: The scale bar in the print composer shows the scale at the bottom of the map.

On the other hand, the scale bar decoration in the map canvas appears to show the scale at the equator, regardless of where the map canvas is centered.

Here you can see the map canvas scale bar decoration compared to the Measurement Tool:

These screenshots are from the map canvas. All at the same scale (1:21,481,793), CRS EPSG 3857, base map is Esri National Geographic.

According to Daniel's comment on this similar question,

QGIS does indeed use the current latitude. It calculates the distance in meters at the mean latitude, then scales that distance to the visible map extent, then converts it from meters to inches to get an inch : meters distance. Details in the source code here: https://github.com/qgis/QGIS/blob/07a570fd0560d1cb31a179b95e75cc5d5caf649b/src/core/qgsscalecalculator.cpp

Also, a comment in the source code above says:

// Note this is an approximation (although very close) but calculating scale for geographic data over large extents is quasi-meaningless