[Qgis-developer] Improving QGIS Measure tool

Alexander Bruy alexander.bruy at gmail.com
Fri Nov 26 11:23:00 EST 2010


Hi Martin,

On Fri, 12 Nov 2010 10:35:35 +0100
Martin Dobias <wonder.sk at gmail.com> wrote:
> Hi Alexander
> 
> You can create your own instance of QgsDistanceArea and use it with
> any parameters you like. The idea of having an instance within map
> renderer was to have a convenience instance of it which has the same
> settings (crs, projections on/off) as the map renderer. But now it
> seems to me that it wasn't that good idea and it will be probably
> removed in a future version - e.g. when using threaded rendering it's
> not clear what should be the result.
> 
> So I think you should create your own QgsDistanceArea instance and set
> the parameters as you need.
> 
> Martin

We modified all three measurement tools to work with unprojected data
in lat-long and automagically give numbers in meters etc (angles are
spherical), calculations are using QgsDistanceArea and based on ellipsoid
from project settings.
Handy for those who have rasters in latlong, but still want to get
measurements in meters/km2.

New measurements patch is in trac http://trac.osgeo.org/qgis/ticket/3240,
can you please have a look and review it. If all ok I can commit this.

Thanks

-- 
Alexander Bruy


More information about the Qgis-developer mailing list