Skip to content

Commit a61a270

Browse files
author
mhugent
committedJul 4, 2008

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed
 

‎src/core/qgsdistancearea.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ QgsDistanceArea::QgsDistanceArea()
4343
// init with default settings
4444
mProjectionsEnabled = FALSE;
4545
mCoordTransform = new QgsCoordinateTransform;
46-
setSourceSRS(EPSGID); // WGS 84
46+
setSourceEPSG(EPSGID); // WGS 84
4747
setEllipsoid("WGS84");
4848
}
4949

@@ -59,8 +59,14 @@ void QgsDistanceArea::setProjectionsEnabled(bool flag)
5959
mProjectionsEnabled = flag;
6060
}
6161

62+
void QgsDistanceArea::setSourceSRS(long srsid)
63+
{
64+
QgsSpatialRefSys srcSRS;
65+
srcSRS.createFromSrsId(srsid);
66+
mCoordTransform->setSourceSRS(srcSRS);
67+
}
6268

63-
void QgsDistanceArea::setSourceSRS(long epsgId)
69+
void QgsDistanceArea::setSourceEPSG(long epsgId)
6470
{
6571
QgsSpatialRefSys srcSRS;
6672
srcSRS.createFromEpsg(epsgId);

‎src/core/qgsdistancearea.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ class CORE_EXPORT QgsDistanceArea
5050
bool projectionsEnabled() { return mProjectionsEnabled; }
5151

5252
//! sets source spatial reference system (by QGIS SRS)
53-
void setSourceSRS(long epsgId);
53+
void setSourceSRS(long srsid);
54+
55+
//! sets source spatial reference system (by EPSG)
56+
void setSourceEPSG(long epsgId);
5457

5558
//! returns source spatial reference system
5659
long sourceSRS() { return mSourceRefSys; }

0 commit comments

Comments
 (0)
Please sign in to comment.