diff --git a/python/core/qgsmaplayer.sip b/python/core/qgsmaplayer.sip index 4fb0505270d..2c231eaa29e 100644 --- a/python/core/qgsmaplayer.sip +++ b/python/core/qgsmaplayer.sip @@ -188,7 +188,17 @@ public: */ virtual QString lastError(); - /** Returns layer's spatial reference system */ + /** Returns layer's spatial reference system + @note This was introduced in QGIS 1.4 + */ + + const QgsCoordinateReferenceSystem& crs(); + + /** Returns layer's spatial reference system + @note This method is here for API compatibility + and will be deprecited in 2.0 + @see crs() + */ const QgsCoordinateReferenceSystem& srs(); /** Sets layer's spatial reference system */ diff --git a/src/core/qgsmaplayer.cpp b/src/core/qgsmaplayer.cpp index 6e643f021a6..d5fc5b66e81 100644 --- a/src/core/qgsmaplayer.cpp +++ b/src/core/qgsmaplayer.cpp @@ -427,8 +427,15 @@ void QgsMapLayer::setSubLayerVisibility( QString name, bool vis ) // NOOP } +const QgsCoordinateReferenceSystem& QgsMapLayer::crs() +{ + return *mCRS; +} + const QgsCoordinateReferenceSystem& QgsMapLayer::srs() { + // This will be dropped in QGIS 2.0 due to conflicting name + // Please use crs() in the future return *mCRS; } diff --git a/src/core/qgsmaplayer.h b/src/core/qgsmaplayer.h index 0e069ef32b2..d856ea70ce9 100644 --- a/src/core/qgsmaplayer.h +++ b/src/core/qgsmaplayer.h @@ -190,7 +190,16 @@ class CORE_EXPORT QgsMapLayer : public QObject */ virtual QString lastError(); - /** Returns layer's spatial reference system */ + /** Returns layer's spatial reference system + @note This was introduced in QGIS 1.4 + */ + const QgsCoordinateReferenceSystem& crs(); + + /** Returns layer's spatial reference system + @note This method is here for API compatibility + and will be deprecited in 2.0 + @see crs() + */ const QgsCoordinateReferenceSystem& srs(); /** Sets layer's spatial reference system */