<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p>Hi Nyall,</p>
<p>Thanks for the explanations. I should have read the explanations of the help text more closely. It explains it all.</p>
<p>However, there still seem to be issues. Consider the following results below. First column is the result of $area, second column is area($geometry).</p>
<p><img src="cid:0b3e71dab61c2bd99a92853f316b9f39@carto.net" alt="" /></p>
<p>Sometimes the results are very close, in other cases the difference is massive. Like in the very first row. 32'087 vs 190'605'589 square meters. This can't be explained with ellipsoidical vs. planimetric. In this first row, the result of area($geometry) (planimetric) seems correct, while the ellipsoidical result ($area) is massively wrong.</p>
<p>How can this huge difference be explained?</p>
<p>------------</p>
<p>Regarding the second issue - yes, it makes sense that OTF has no influence and that always the project CRS is used.</p>
<p>Thanks!</p>
<p>Andreas</p>
<p> </p>
<p> </p>
<p>On 2017-02-01 10:30, Nyall Dawson wrote:</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0"><!-- html ignored --><!-- head ignored --><!-- meta ignored -->
<div class="pre" style="margin: 0; padding: 0; font-family: monospace">On 1 February 2017 at 18:55, Neumann, Andreas <<a href="mailto:a.neumann@carto.net">a.neumann@carto.net</a>> wrote:
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">Hi,<br /><br /> Regarding field calculator:<br /><br /> I wonder what the difference between $area and area($geometry) is?</blockquote>
<br /> $area respects project settings like ellipsoid choice and area units.<br /><br /> area(geometry) is just a plain cartesian calculator.<br /><br />
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">They deliver different results - sometimes quite close, but sometimes with a<br /> hug difference.<br /><br /></blockquote>
<br /> The results will vary (sometimes by a huge amount) depending on the<br /> geometry's crs and ellipsoid choice. Eg area($geometry) for geometries<br /> in geographic coordinates in mostly meaningless, and the same for<br /> projections like web mercator.<br /><br /><br />
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">I have to add, that the data contains circular arcs.</blockquote>
<br /> Should not affect anything.<br /><br />
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">Another user reported me that area calculation results are different<br /> depending on OTF is on or off (I have to ask which QGIS version, he did not<br /> tell).</blockquote>
<br /> Yes - switching off OTF will reset the ellipsoid to none. Switching it<br /> on resets the ellipsoid choice back to the ellipsoid matching the<br /> project CRS.<br /><br /> This was very confusing behaviour. The good news is that I changed<br /> this a week or so ago in qgis 3. Now OTF has no impact on area or<br /> length calculations, and that *only* depends on the project ellipsoid<br /> choice.<br /><br /> (There was talk at the time that we should totally remove the OTF off<br /> option. I'm in favour of this and will probably tackle it soon).<br /><br /> Nyall</div>
</blockquote>
<p> </p>
<div> </div>
</body></html>