Bug report #3866

Measure tool is windows is unusable

Added by Nathan Woodrow about 9 years ago. Updated about 9 years ago.

Status:Closed
Priority:Low
Assignee:-
Category:Map Canvas
Affected QGIS version: Regression?:No
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied: Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:13924

Description

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.

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

measure_angle.diff Magnifier - path for measure angle tool. (4.28 KB) Sergey Yakushev, 2011-06-09 11:40 PM

Associated revisions

Revision d750abfa
Added by Sergey Yakushev about 9 years ago

Fix #3866 for measure angle tool

Revision 1a761e96
Added by Sergey Yakushev about 9 years ago

Fix #3866 for measure angle tool

History

#1 Updated by Jürgen Fischer about 9 years ago

Why should it be slower on Windows? I suppose it's just the noisy debugging output that makes it slow.

#2 Updated by Jürgen Fischer about 9 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed

#3 Updated by Sergey Yakushev about 9 years ago

This Bug is partial solved. The fact that a similar problem in the measuring angles tool (corrected only tool of measurement of distances and areas). Look at call QgsMapToolMeasureAngle::configureDistanceArea() in QgsMapToolMeastureAngle::canvasMouseMove() [1]

1. https://github.com/qgis/Quantum-GIS/blob/master/src/app/qgsmaptoolmeasureangle.cpp#L58

#4 Updated by Alexander Bruy about 9 years ago

  • Assignee deleted (nobody -)

Patch for measure angle tool applied in d750abfa2bfb197cde8e

Also available in: Atom PDF