Skip to content

Commit 2fe497f

Browse files
author
timlinux
committedOct 19, 2008
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
1 parent 7c0bb66 commit 2fe497f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed
 

‎src/plugins/coordinate_capture/coordinatecapture.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ void CoordinateCapture::setCRS()
162162
if ( mySelector.exec() )
163163
{
164164
mEpsgId = mySelector.selectedEpsg();
165+
mProj4Str = mySelector.selectedProj4String();
165166
}
166167
}
167168

@@ -185,7 +186,7 @@ void CoordinateCapture::update( QgsPoint thePoint )
185186
{
186187
//this is the coordinate resolved back to lat / lon
187188
QgsCoordinateReferenceSystem mySrs;
188-
mySrs.createFromEpsg( mEpsgId ); //geo lat lon
189+
mySrs.createFromProj4( mProj4Str );
189190
QgsCoordinateTransform myTransform( mQGisIface->mapCanvas()->mapRenderer()->destinationSrs(), mySrs );
190191
QgsPoint myUserCrsPoint = myTransform.transform( thePoint );
191192
mpUserCrsEdit->setText( QString::number( myUserCrsPoint.x(), 'f', 3 ) + "," +

‎src/plugins/coordinate_capture/coordinatecapture.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ class CoordinateCapture: public QObject, public QgisPlugin
119119

120120
//!epsg id for showin in geoedit box
121121
long mEpsgId;
122+
//!proj4 string for coordinate translation
123+
QString mProj4Str;
122124

123125
////////////////////////////////////////////////////////////////////
124126
//

0 commit comments

Comments
 (0)
Please sign in to comment.