Re: [Qgis-developer] Measure tool ignore 'measure\ellipsoid' QGis settings

2011-01-03 Thread Martin Dobias
2011/1/3 Sergey Yakushev :
> 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
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] Measure tool ignore 'measure\ellipsoid' QGis settings

2011-01-03 Thread Marco Hugentobler
Hi Sergey

Ticket is assigned.

> mTool->canvas()->mapRenderer()->distanceArea()->ellipsoid() return always
> WGS84

If maprenderer does not take the ellipsoid from settings, it's probably a bug.

Regards,
Marco

Am Montag, 3. Januar 2011, um 10.18:10 schrieb Sergey Yakushev:
> 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?
> 
> P.S.
> For measure tools I have a path to use 'measure\ellipsoid' (
> http://trac.osgeo.org/qgis/ticket/3384 )
> 
> --
> Thanks


-- 
Dr. Marco Hugentobler
Sourcepole - Linux & Open Source Solutions
Churerstr. 22, CH-8808 Pfäffikon SZ, Switzerland
marco.hugentob...@sourcepole.ch http://www.sourcepole.ch
Technical Advisor QGIS Project Steering Committee
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] Measure tool ignore 'measure\ellipsoid' QGis settings

2011-01-03 Thread Sergey Yakushev
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?

P.S. 
For measure tools I have a path to use 'measure\ellipsoid' ( 
http://trac.osgeo.org/qgis/ticket/3384 )

--
Thanks

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer