[Qgis-developer] Measure tool ignore 'measure\ellipsoid' QGis
settings
Martin Dobias
wonder.sk at gmail.com
Mon Jan 3 14:56:26 EST 2011
2011/1/3 Sergey Yakushev <yakushevs at list.ru>:
> Hi.
>
> I'm author measure_ellipsoid.diff ( http://trac.osgeo.org/qgis/ticket/3240 )
> .
>
> In file src/app/qgsmeasuredialog.cpp, line 139
> mTool->canvas()->mapRenderer()->distanceArea()->ellipsoid() return always
> WGS84.
> It not depend on project coordinate systems or "measure\ellpsiod" settings.
>
> I know not good code QGIS. This is a bug or a feature?
Hi Sergey
I would recommend not to use the distanceArea() instance from
QgsMapRenderer at all. It was supposed to be a convenient instance,
however it's better to construct your own QgsDistanceArea instance
when doing anything with measuring. The main problem with that
instance is that other code (e.g. plugin) could modify your parameters
and the measuring will be wrong. Anyway that instance currently reacts
only when on-the-fly projections are turned on/off and when project
CRS got changed.
Martin
More information about the Qgis-developer
mailing list