File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ QgsDistanceArea::QgsDistanceArea()
43
43
// init with default settings
44
44
mProjectionsEnabled = FALSE ;
45
45
mCoordTransform = new QgsCoordinateTransform;
46
- setSourceSRS (EPSGID); // WGS 84
46
+ setSourceEPSG (EPSGID); // WGS 84
47
47
setEllipsoid (" WGS84" );
48
48
}
49
49
@@ -59,8 +59,14 @@ void QgsDistanceArea::setProjectionsEnabled(bool flag)
59
59
mProjectionsEnabled = flag;
60
60
}
61
61
62
+ void QgsDistanceArea::setSourceSRS (long srsid)
63
+ {
64
+ QgsSpatialRefSys srcSRS;
65
+ srcSRS.createFromSrsId (srsid);
66
+ mCoordTransform ->setSourceSRS (srcSRS);
67
+ }
62
68
63
- void QgsDistanceArea::setSourceSRS (long epsgId)
69
+ void QgsDistanceArea::setSourceEPSG (long epsgId)
64
70
{
65
71
QgsSpatialRefSys srcSRS;
66
72
srcSRS.createFromEpsg (epsgId);
Original file line number Diff line number Diff line change @@ -50,7 +50,10 @@ class CORE_EXPORT QgsDistanceArea
50
50
bool projectionsEnabled () { return mProjectionsEnabled ; }
51
51
52
52
// ! 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);
54
57
55
58
// ! returns source spatial reference system
56
59
long sourceSRS () { return mSourceRefSys ; }
You can’t perform that action at this time.
0 commit comments