Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#1478 closed patch (fixed)

Coordinate Capture plugin - fixes and enhancements

Reported by: smizuno Owned by: timlinux
Priority: minor: annoyance Milestone:
Component: C++ Plugins Version: Trunk
Keywords: Cc:
Must Fix for Release: No Platform: All
Platform Version: Awaiting user input: no

Description

I have found the Coordinate Capture tool very useful, but have found the following deficiencies:

  1. the projection selector does not show the currently selected CRS. This is because a call that ultimately goes to QgsGenericProjectionSelector::setSelectedEpsg(), which doesn't do anything.
  1. very sluggish update of the coordinate displays during mouse move. This is caused by creating the destination CRS object from a PROJ4 text string in the mouse movement handler. It is not necessary to build it on mouse movement.
  1. three places to right of decimal point is not useful for long/lat - should be at least 4 places (approximately 1 second precision)

Here is a summary of the patch provided.

I have changed the overall handling of the user selected CRS to use QGIS internal CRS IDs. This allows use of user defined CRS, which seems to be why the PROJ4 text string was used.

The destination CRS object is constructed when a CRS is chosen. This object is used in the mouse movement handler. Now the update of the display is much faster, and with lower CPU utilization.

Also, the source CRS is updated via SIGNAL/SLOT when the project CRS is changed.

The number of places to the right of the decimal in the coordinate boxes have 3 (if units are meters or feet) or 8 (if units is degrees). This gives up to 9-10 digits of precision, which is well more than is normally necessary.

Attachments (1)

patch_for_1478.txt (4.7 KB ) - added by smizuno 15 years ago.
patch CoordinateCapture

Download all attachments as: .zip

Change History (4)

by smizuno, 15 years ago

Attachment: patch_for_1478.txt added

in reply to:  description comment:1 by msieczka, 15 years ago

Replying to smizuno:

I have changed the overall handling of the user selected CRS to use QGIS internal CRS IDs. This allows use of user defined CRS, which seems to be why the PROJ4 text string was used.

QGIS CRS ids are not reliable. They might change on synchronisation between QGIS and GDAL's EPSG database representation. Only EPSG code are meant to be stable.

comment:2 by timlinux, 15 years ago

Milestone: Version 1.0.1
Resolution: fixed
Status: newclosed

I dont think using QGIS internal CRS is a concern here since this plugin is being used in an internal context.

SMizuno, many thanks for your patch, I've applied it as r9937 to stable branch and as r9940 to trunk.

Regards

Tim

comment:3 by (none), 15 years ago

Milestone: Version 1.0.1

Milestone Version 1.0.1 deleted

Note: See TracTickets for help on using tickets.