On 25 June 2014 01:20, Bernhard Ströbl <bernhard.stro...@jena.de> wrote:
>>> It does also matter in degrees, depending on the projection. same in >>> meters: 1 cm on the map represents always a certain distance in >>> reality (though this distance varies troughout the map depending on >>> the projection and the area covered). If you look at the Lambert map, >>> you realize that the distance between two parallels (10 degrees!) >>> increases towards the pole, although in reality it is always (10*110km >>> =) 1100 km. In the WGS84 map the distance between the parallels is >>> constant but so is the distance between the meridians, but this is >>> false as the distance gets less towards the pole in reality. So a >>> scalebar (in m) being accurate in the middle of the map becomes less >>> accurate towards the edges. Hence my question on which base the >>> scalebar is calculated. >> >> >> The question absolutely makes sense but I don't know the answer :) > > > Could you check? or whom would we have to ask? It's calculated this way: If you're working in a projected coordinate system (ie, map units are metres): - Take the current extent of the map, calculate the width (x max - x min), divide this by the width on paper of the map If you're working in a geographic coordinate system (ie, map units are degrees): - Convert the width of the map (map's extent x max - x min) from degrees to metres, using a variant of the Haversine formula, and treating the current latitude as the MIDDLE LATITUDE from the map's extent - Convert this distance to a scale by dividing by the width on paper of the map So, yes, scalebars using m/km/miles/etc are only an approximation when map units are degrees, and are very inaccurate when used with maps covering a large area or for areas far from the equator. Nyall _______________________________________________ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer