Re: [Qgis-developer] Area calculation issues
On 3 February 2017 at 16:54, Neumann, Andreaswrote: > Dear Nyall, > > Thank you so much for analyzing the issue and also thank you in advance for > porting the fix to 2.18! Done now. I also added one of those polygons to the reference geometry test to ensure that all other stats (perimeter, centroid, etc) match PostGIS' results. Nyall > > I opened the sample project with 2.14 and I can confirm that the area values > of both planimetric and ellipsoidic area calculations are very close for all > features. > > It is very much appreciated! > > Thanks, > > Andreas > > On 2017-02-03 01:36, Nyall Dawson wrote: > > On 1 February 2017 at 19:55, Neumann, Andreas wrote: > > > Hi Nyall, > > Thanks for the explanations. I should have read the explanations of the help > text more closely. It explains it all. > > However, there still seem to be issues. Consider the following results > below. First column is the result of $area, second column is > area($geometry). > > 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. > > How can this huge difference be explained? > > > Ok - I've looked into this. It's not an issue in 2.14 or 3.0, just 2.18. > > It was most likely fixed by: > https://github.com/qgis/QGIS/commit/abc0919 "Fix area calculation of > compoundcurve rings if they contain a 2-vertex linestring" > > Committed to 2.14 (with unit tests), I forward ported to 3.0, but it > hasn't been applied to 2.18. I'll do this. > > Nyall > > > > ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Area calculation issues
Dear Nyall, Thank you so much for analyzing the issue and also thank you in advance for porting the fix to 2.18! I opened the sample project with 2.14 and I can confirm that the area values of both planimetric and ellipsoidic area calculations are very close for all features. It is very much appreciated! Thanks, Andreas On 2017-02-03 01:36, Nyall Dawson wrote: > On 1 February 2017 at 19:55, Neumann, Andreaswrote: > >> Hi Nyall, >> >> Thanks for the explanations. I should have read the explanations of the help >> text more closely. It explains it all. >> >> However, there still seem to be issues. Consider the following results >> below. First column is the result of $area, second column is area($geometry). >> >> 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. >> >> How can this huge difference be explained? > > Ok - I've looked into this. It's not an issue in 2.14 or 3.0, just 2.18. > > It was most likely fixed by: > https://github.com/qgis/QGIS/commit/abc0919 "Fix area calculation of > compoundcurve rings if they contain a 2-vertex linestring" > > Committed to 2.14 (with unit tests), I forward ported to 3.0, but it > hasn't been applied to 2.18. I'll do this. > > Nyall ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Area calculation issues
On 1 February 2017 at 19:55, Neumann, Andreaswrote: > > Hi Nyall, > > Thanks for the explanations. I should have read the explanations of the help > text more closely. It explains it all. > > However, there still seem to be issues. Consider the following results below. > First column is the result of $area, second column is area($geometry). > > 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. > > How can this huge difference be explained? Ok - I've looked into this. It's not an issue in 2.14 or 3.0, just 2.18. It was most likely fixed by: https://github.com/qgis/QGIS/commit/abc0919 "Fix area calculation of compoundcurve rings if they contain a 2-vertex linestring" Committed to 2.14 (with unit tests), I forward ported to 3.0, but it hasn't been applied to 2.18. I'll do this. Nyall ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Area calculation issues
Hi all, > Hi Andreas and Nyall, > > Please, share the conclusions here, after you find the problem. I'm also very interested in know the results or help test if a sample dataset is available. cheers! -- G -- ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Area calculation issues
Hi Andreas and Nyall, Please, share the conclusions here, after you find the problem. Thanks! Pedro 2017-02-01 10:02 GMT+00:00 Andreas Neumann: > Sure - I'll send it to you as a geopackage file. > > Andreas > > > > On 01.02.2017 11:01, Nyall Dawson wrote: > >> On 1 February 2017 at 19:55, Neumann, Andreas >> wrote: >> >>> Hi Nyall, >>> >>> Thanks for the explanations. I should have read the explanations of the >>> help text more closely. It explains it all. >>> >>> However, there still seem to be issues. Consider the following results >>> below. First column is the result of $area, second column is >>> area($geometry). >>> >>> 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. >>> >>> How can this huge difference be explained? >>> >>> Can you share your dataset? >> >> Nyall >> > > ___ > Qgis-developer mailing list > Qgis-developer@lists.osgeo.org > List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer > ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Area calculation issues
Sure - I'll send it to you as a geopackage file. Andreas On 01.02.2017 11:01, Nyall Dawson wrote: On 1 February 2017 at 19:55, Neumann, Andreaswrote: Hi Nyall, Thanks for the explanations. I should have read the explanations of the help text more closely. It explains it all. However, there still seem to be issues. Consider the following results below. First column is the result of $area, second column is area($geometry). 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. How can this huge difference be explained? Can you share your dataset? Nyall ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Area calculation issues
On 1 February 2017 at 19:55, Neumann, Andreaswrote: > > Hi Nyall, > > Thanks for the explanations. I should have read the explanations of the help > text more closely. It explains it all. > > However, there still seem to be issues. Consider the following results below. > First column is the result of $area, second column is area($geometry). > > 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. > > How can this huge difference be explained? > Can you share your dataset? Nyall ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Area calculation issues
Hi Nyall, Thanks for the explanations. I should have read the explanations of the help text more closely. It explains it all. However, there still seem to be issues. Consider the following results below. First column is the result of $area, second column is area($geometry). 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. How can this huge difference be explained? Regarding the second issue - yes, it makes sense that OTF has no influence and that always the project CRS is used. Thanks! Andreas On 2017-02-01 10:30, Nyall Dawson wrote: > On 1 February 2017 at 18:55, Neumann, Andreaswrote: > >> Hi, >> >> Regarding field calculator: >> >> I wonder what the difference between $area and area($geometry) is? > > $area respects project settings like ellipsoid choice and area units. > > area(geometry) is just a plain cartesian calculator. > >> They deliver different results - sometimes quite close, but sometimes with a >> hug difference. > > The results will vary (sometimes by a huge amount) depending on the > geometry's crs and ellipsoid choice. Eg area($geometry) for geometries > in geographic coordinates in mostly meaningless, and the same for > projections like web mercator. > >> I have to add, that the data contains circular arcs. > > Should not affect anything. > >> Another user reported me that area calculation results are different >> depending on OTF is on or off (I have to ask which QGIS version, he did not >> tell). > > Yes - switching off OTF will reset the ellipsoid to none. Switching it > on resets the ellipsoid choice back to the ellipsoid matching the > project CRS. > > This was very confusing behaviour. The good news is that I changed > this a week or so ago in qgis 3. Now OTF has no impact on area or > length calculations, and that *only* depends on the project ellipsoid > choice. > > (There was talk at the time that we should totally remove the OTF off > option. I'm in favour of this and will probably tackle it soon). > > Nyall ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Area calculation issues
On 1 February 2017 at 18:55, Neumann, Andreaswrote: > Hi, > > Regarding field calculator: > > I wonder what the difference between $area and area($geometry) is? $area respects project settings like ellipsoid choice and area units. area(geometry) is just a plain cartesian calculator. > They deliver different results - sometimes quite close, but sometimes with a > hug difference. > The results will vary (sometimes by a huge amount) depending on the geometry's crs and ellipsoid choice. Eg area($geometry) for geometries in geographic coordinates in mostly meaningless, and the same for projections like web mercator. > I have to add, that the data contains circular arcs. Should not affect anything. > Another user reported me that area calculation results are different > depending on OTF is on or off (I have to ask which QGIS version, he did not > tell). Yes - switching off OTF will reset the ellipsoid to none. Switching it on resets the ellipsoid choice back to the ellipsoid matching the project CRS. This was very confusing behaviour. The good news is that I changed this a week or so ago in qgis 3. Now OTF has no impact on area or length calculations, and that *only* depends on the project ellipsoid choice. (There was talk at the time that we should totally remove the OTF off option. I'm in favour of this and will probably tackle it soon). Nyall ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] Area calculation issues
Hi, Regarding field calculator: I wonder what the difference between $area and area($geometry) is? They deliver different results - sometimes quite close, but sometimes with a hug difference. I have to add, that the data contains circular arcs. Tested with 2.18.x. OTF off. Nyall - I remember that you dived into this issue in one of the past bug fixing efforts? Can you explain it? I can deliver a small dataset demonstrating the issue. --- Another user reported me that area calculation results are different depending on OTF is on or off (I have to ask which QGIS version, he did not tell). All data sets in the projects use a meter based system. The data set of the assumedly wrong area calculations are in the same coordinate system as the project. Thanks, Andreas ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer