[Qgis-developer] Why is ellipsoidal calculation tied to project OTF setting?
Martin Dobias
wonder.sk at gmail.com
Tue Feb 9 02:56:02 PST 2016
Hi Nyall
On Fri, Feb 5, 2016 at 11:02 PM, Nyall Dawson <nyall.dawson at gmail.com> wrote:
>
> In QGIS ellipsoidal distance/area calculations are ONLY enabled when the
> project has OTF crs transformation enabled. It could be because I've spent
> too long staring at this code and lost sight of the bigger picture, but why
> is this a requirement??
This was done loong time ago, and if I understand it correctly, it was
based on this assumption: if OTF reprojection is disabled, we cannot
tell anything about the input coordinates - whether they were measured
on top of a lat/lon CRS or projected CRS - so we play it "safe" and do
not try to do calculation based on ellipsoid.
I think that logic is a result of some ad-hoc improvements. IIRC first
QGIS used only planimetric distances. Then I rewrote the measuring to
be completely based on ellipsoid distances. That was around 10 years
ago and I was coming from world of GPS where everything was in WGS84
and planimetric distances did not feel right for lat/lon coords :-) I
was completely new to GIS, so I did not even think that people would
ever want distances that are not calculated on ellipsoid... Eventually
planimetric distances returned at some point later - with all sorts of
logic when/how to do planimetric/ellipsoid calculations. So I take my
part of blame for the current situation :-)
> I can't see any reason why an ellipsoid can't be used even when layers
> aren't being reprojected on the fly. To me, it's a totally different setting
> without any relation to distance/area measurement.
Indeed - I totally agree. The fact that measurements are done in
different ways based on whether OTF reprojection is enabled is really
confusing.
> If you don't want ellipsoidal calculation you could still set the ellipsoid
> to none. But you *could* potentially want ellipsoidal calculation even when
> OTF is off.
Exactly.
Cheers
Martin
More information about the Qgis-developer
mailing list