Skip to content
Permalink
Browse files
Add setSourceCrs( QgsCoordinateReferenceSystem )
  • Loading branch information
m-kuhn committed Sep 5, 2013
1 parent 8b131bd commit a2886ccc30ed455176014293cd23c31f775bef99
Showing with 10 additions and 2 deletions.
  1. +1 −1 src/app/qgsattributetabledialog.cpp
  2. +1 −1 src/app/qgsfeatureaction.cpp
  3. +5 −0 src/core/qgsdistancearea.cpp
  4. +3 −0 src/core/qgsdistancearea.h
@@ -74,7 +74,7 @@ QgsAttributeTableDialog::QgsAttributeTableDialog( QgsVectorLayer *theLayer, QWid

QgsDistanceArea myDa;

myDa.setSourceCrs( mLayer->crs().srsid() );
myDa.setSourceCrs( mLayer->crs() );
myDa.setEllipsoidalMode( QgisApp::instance()->mapCanvas()->mapRenderer()->hasCrsTransformEnabled() );
myDa.setEllipsoid( QgsProject::instance()->readEntry( "Measure", "/Ellipsoid", GEO_NONE ) );

@@ -49,7 +49,7 @@ QgsAttributeDialog *QgsFeatureAction::newDialog( bool cloneFeature )

QgsDistanceArea myDa;

myDa.setSourceCrs( mLayer->crs().srsid() );
myDa.setSourceCrs( mLayer->crs() );
myDa.setEllipsoidalMode( QgisApp::instance()->mapCanvas()->mapRenderer()->hasCrsTransformEnabled() );
myDa.setEllipsoid( QgsProject::instance()->readEntry( "Measure", "/Ellipsoid", GEO_NONE ) );

@@ -98,6 +98,11 @@ void QgsDistanceArea::setSourceCrs( long srsid )
mCoordTransform->setSourceCrs( srcCRS );
}

void QgsDistanceArea::setSourceCrs( const QgsCoordinateReferenceSystem& srcCRS )
{
mCoordTransform->setSourceCrs( srcCRS );
}

void QgsDistanceArea::setSourceAuthId( QString authId )
{
QgsCoordinateReferenceSystem srcCRS;
@@ -55,6 +55,9 @@ class CORE_EXPORT QgsDistanceArea
//! sets source spatial reference system (by QGIS CRS)
void setSourceCrs( long srsid );

//! sets source spatial reference system (by QGIS CRS)
void setSourceCrs( const QgsCoordinateReferenceSystem& srcCRS );

//! sets source spatial reference system by authid
void setSourceAuthId( QString authid );

0 comments on commit a2886cc

Please sign in to comment.