Skip to content
Permalink
Browse files
Bugfix from Fernando Pacheco so that coord capture plugin works with …
…non EPSG based CRSes in selector list

git-svn-id: http://svn.osgeo.org/qgis/trunk@9497 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Oct 19, 2008
1 parent 7c0bb66 commit 2fe497f637b23c7a0a398b60b4fa54262769024c
Showing with 4 additions and 1 deletion.
  1. +2 −1 src/plugins/coordinate_capture/coordinatecapture.cpp
  2. +2 −0 src/plugins/coordinate_capture/coordinatecapture.h
@@ -162,6 +162,7 @@ void CoordinateCapture::setCRS()
if ( mySelector.exec() )
{
mEpsgId = mySelector.selectedEpsg();
mProj4Str = mySelector.selectedProj4String();
}
}

@@ -185,7 +186,7 @@ void CoordinateCapture::update( QgsPoint thePoint )
{
//this is the coordinate resolved back to lat / lon
QgsCoordinateReferenceSystem mySrs;
mySrs.createFromEpsg( mEpsgId ); //geo lat lon
mySrs.createFromProj4( mProj4Str );
QgsCoordinateTransform myTransform( mQGisIface->mapCanvas()->mapRenderer()->destinationSrs(), mySrs );
QgsPoint myUserCrsPoint = myTransform.transform( thePoint );
mpUserCrsEdit->setText( QString::number( myUserCrsPoint.x(), 'f', 3 ) + "," +
@@ -119,6 +119,8 @@ class CoordinateCapture: public QObject, public QgisPlugin

//!epsg id for showin in geoedit box
long mEpsgId;
//!proj4 string for coordinate translation
QString mProj4Str;

////////////////////////////////////////////////////////////////////
//

0 comments on commit 2fe497f

Please sign in to comment.