[QGIS-trac] [Quantum GIS] #3866: Measure tool is windows is unusable

Quantum GIS qgis at qgis.org
Thu Jun 2 22:16:50 EDT 2011


#3866: Measure tool is windows is unusable
------------------------------------------------+---------------------------
   Reporter:  NathanW                           |              Owner:  nobody       
       Type:  bug                               |             Status:  new          
   Priority:  major: does not work as expected  |          Milestone:  Version 1.7.0
  Component:  MapCanvas                         |            Version:  Trunk        
   Keywords:                                    |   Platform_version:               
   Platform:  Windows                           |           Must_fix:  Yes          
Status_info:  0                                 |  
------------------------------------------------+---------------------------
 In windows the measure tool is pretty much unusable, it's very slow and
 glitches a lot.

 Looking at the debug log a lot of calls are made to setEllisoid(). Each
 time the mouse moves this is printed.

 {{{
 [45184] d:\src\qgis\src\core\qgsdistancearea.cpp(161) :
 (QgsDistanceArea::setEllipsoid) setEllipsoid: a=6.37814e+06,
 b=6.37814e+06, 1/f=298.257
 [45184] d:\src\qgis\src\core\qgscoordinatereferencesystem.cpp(349) :
 (QgsCoordinateReferenceSystem::createFromProj4) proj4: +proj=longlat
 +ellps=WGS84 +no_defs
 [45184] d:\src\qgis\src\core\qgscoordinatereferencesystem.cpp(378) :
 (QgsCoordinateReferenceSystem::createFromProj4) proj string supplied has
 no +a argument
 [45184] d:\src\qgis\src\core\qgscoordinatereferencesystem.cpp(540) :
 (QgsCoordinateReferenceSystem::getRecord) running query: select * from
 tbl_srs where parameters='+proj=longlat +ellps=WGS84 +no_defs'
 [45184] d:\src\qgis\src\core\qgscoordinatereferencesystem.cpp(562) :
 (QgsCoordinateReferenceSystem::getRecord) trying system srs.db
 [45184] d:\src\qgis\src\core\qgscoordinatereferencesystem.cpp(617) :
 (QgsCoordinateReferenceSystem::getRecord) retrieved:  select * from
 tbl_srs where parameters='+proj=longlat +ellps=WGS84 +no_defs'
 [45184] d:\src\qgis\src\core\qgscoordinatereferencesystem.cpp(406) :
 (QgsCoordinateReferenceSystem::createFromProj4) proj4string match search
 for srsid returned srsid: 3239
 [45184] d:\src\qgis\src\core\qgscoordinatereferencesystem.cpp(799) :
 (QgsCoordinateReferenceSystem::setMapUnits) Projection has linear units of
 Meter
 [45184] d:\src\qgis\src\core\qgscoordinatereferencesystem.cpp(799) :
 (QgsCoordinateReferenceSystem::setMapUnits) Projection has linear units of
 Meter
 }}}

 Tracked down to this bit of code:

 {{{
 void QgsMeasureDialog::configureDistanceArea( QgsDistanceArea& da )
 {
   QSettings settings;
   QString ellipsoidId = settings.value( "/qgis/measure/ellipsoid", "WGS84"
 ).toString();
   da.setSourceCrs(
 mTool->canvas()->mapRenderer()->destinationCrs().srsid() );
   da.setEllipsoid( ellipsoidId );
   da.setProjectionsEnabled( mcbProjectionEnabled->isChecked() );
 }

 }}}

 Which is called on every mouse move. Do we really need to call it on every
 mouse move?

-- 
Ticket URL: <https://trac.osgeo.org/qgis/ticket/3866>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS supporting GDAL/OGR, PostGIS, and GRASS formats, and Web Services


More information about the QGIS-trac mailing list