Skip to content

Commit

Permalink
Deprecate the use of SRS in favour of CRS in api
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@15445 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Mar 12, 2011
1 parent 848de72 commit f13e919
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 12 deletions.
16 changes: 8 additions & 8 deletions src/core/qgsmaprenderer.cpp
Expand Up @@ -660,21 +660,21 @@ bool QgsMapRenderer::hasCrsTransformEnabled()
return mProjectionsEnabled;
}

void QgsMapRenderer::setDestinationSrs( const QgsCoordinateReferenceSystem& srs )
void QgsMapRenderer::setDestinationCrs( const QgsCoordinateReferenceSystem& crs )
{
QgsDebugMsg( "* Setting destCRS : = " + srs.toProj4() );
QgsDebugMsg( "* DestCRS.srsid() = " + QString::number( srs.srsid() ) );
if ( *mDestCRS != srs )
QgsDebugMsg( "* Setting destCRS : = " + crs.toProj4() );
QgsDebugMsg( "* DestCRS.srsid() = " + QString::number( crs.srsid() ) );
if ( *mDestCRS != crs )
{
QgsDebugMsg( "Setting DistArea CRS to " + QString::number( srs.srsid() ) );
mDistArea->setSourceCrs( srs.srsid() );
*mDestCRS = srs;
QgsDebugMsg( "Setting DistArea CRS to " + QString::number( crs.srsid() ) );
mDistArea->setSourceCrs( crs.srsid() );
*mDestCRS = crs;
updateFullExtent();
emit destinationSrsChanged();
}
}

const QgsCoordinateReferenceSystem& QgsMapRenderer::destinationSrs()
const QgsCoordinateReferenceSystem& QgsMapRenderer::destinationCrs()
{
QgsDebugMsgLevel( "* Returning destCRS", 3 );
QgsDebugMsgLevel( "* DestCRS.srsid() = " + QString::number( mDestCRS->srsid() ), 3 );
Expand Down
20 changes: 16 additions & 4 deletions src/core/qgsmaprenderer.h
Expand Up @@ -169,11 +169,23 @@ class CORE_EXPORT QgsMapRenderer : public QObject
//! returns true if projections are enabled for this layer set
bool hasCrsTransformEnabled();

//! sets destination spatial reference system
void setDestinationSrs( const QgsCoordinateReferenceSystem& srs );
/** sets destination coordinate reference system
* @note deprecated by qgis 1.7
* @see setDestinationCrs
*/
Q_DECL_DEPRECATED void setDestinationSrs( const QgsCoordinateReferenceSystem& srs ) { setDestinationCrs( srs ); };

/** returns CRS of destination coordinate reference system
* @note deprecated by qgis 1.7
* @see destinationCrs
*/
Q_DECL_DEPRECATED const QgsCoordinateReferenceSystem& destinationSrs() { return destinationCrs(); };

//! sets destination coordinate reference system
void setDestinationCrs( const QgsCoordinateReferenceSystem& crs );

//! returns CRS of destination spatial reference system
const QgsCoordinateReferenceSystem& destinationSrs();
//! returns CRS of destination coordinate reference system
const QgsCoordinateReferenceSystem& destinationCrs();

void setOutputUnits( OutputUnits u ) {mOutputUnits = u;}

Expand Down

0 comments on commit f13e919

Please sign in to comment.