Skip to content
Permalink
Browse files

Deprecate the use of SRS in favour of CRS in api

git-svn-id: http://svn.osgeo.org/qgis/trunk@15445 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux
timlinux committed Mar 12, 2011
1 parent 848de72 commit f13e919a67f050172e1e626e3bba3f8205af305d
Showing with 24 additions and 12 deletions.
  1. +8 −8 src/core/qgsmaprenderer.cpp
  2. +16 −4 src/core/qgsmaprenderer.h
@@ -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 );
@@ -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;}

0 comments on commit f13e919

Please sign in to comment.
You can’t perform that action at this time.