Skip to content
Permalink
Browse files
Fix for bug #1136 measure tools show wrong values
git-svn-id: http://svn.osgeo.org/qgis/trunk@8709 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Jul 4, 2008
1 parent 1a610e2 commit de226cd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
@@ -43,7 +43,7 @@ QgsDistanceArea::QgsDistanceArea()
// init with default settings
mProjectionsEnabled = FALSE;
mCoordTransform = new QgsCoordinateTransform;
setSourceSRS(EPSGID); // WGS 84
setSourceEPSG(EPSGID); // WGS 84
setEllipsoid("WGS84");
}

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

void QgsDistanceArea::setSourceSRS(long srsid)
{
QgsSpatialRefSys srcSRS;
srcSRS.createFromSrsId(srsid);
mCoordTransform->setSourceSRS(srcSRS);
}

void QgsDistanceArea::setSourceSRS(long epsgId)
void QgsDistanceArea::setSourceEPSG(long epsgId)
{
QgsSpatialRefSys srcSRS;
srcSRS.createFromEpsg(epsgId);
@@ -50,7 +50,10 @@ class CORE_EXPORT QgsDistanceArea
bool projectionsEnabled() { return mProjectionsEnabled; }

//! sets source spatial reference system (by QGIS SRS)
void setSourceSRS(long epsgId);
void setSourceSRS(long srsid);

//! sets source spatial reference system (by EPSG)
void setSourceEPSG(long epsgId);

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

0 comments on commit de226cd

Please sign in to comment.