mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
Fix naming of reverse coordinate transform enum
git-svn-id: http://svn.osgeo.org/qgis/trunk@9498 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
2fe497f637
commit
ba986011cd
@ -57,7 +57,7 @@ class QgsCoordinateTransform : QObject
|
||||
//! Enum used to indicate the direction (forward or inverse) of the transform
|
||||
enum TransformDirection{
|
||||
ForwardTransform, /*!< Transform from source to destination CRS. */
|
||||
INVERSE /*!< Transform from destination to source CRS. */
|
||||
ReverseTransform /*!< Transform from destination to source CRS. */
|
||||
};
|
||||
|
||||
/*!
|
||||
|
@ -436,7 +436,7 @@ void QgsCoordinateTransform::transformCoords( const int& numPoints, double *x, d
|
||||
QString dir;
|
||||
// if the source/destination projection is lat/long, convert the points to radians
|
||||
// prior to transforming
|
||||
if (( pj_is_latlong( mDestinationProjection ) && ( direction == INVERSE ) )
|
||||
if (( pj_is_latlong( mDestinationProjection ) && ( direction == ReverseTransform ) )
|
||||
|| ( pj_is_latlong( mSourceProjection ) && ( direction == ForwardTransform ) ) )
|
||||
{
|
||||
for ( int i = 0; i < numPoints; ++i )
|
||||
@ -448,10 +448,10 @@ void QgsCoordinateTransform::transformCoords( const int& numPoints, double *x, d
|
||||
|
||||
}
|
||||
int projResult;
|
||||
if ( direction == INVERSE )
|
||||
if ( direction == ReverseTransform )
|
||||
{
|
||||
#if 0
|
||||
QgsDebugMsg( "!!!! INVERSE PROJ4 TRANSFORM !!!!" );
|
||||
QgsDebugMsg( "!!!! ReverseTransform PROJ4 TRANSFORM !!!!" );
|
||||
QgsDebugMsg( QString( " numPoint: %1" ).arg( numPoints ) );
|
||||
QgsDebugMsg( QString( " x : %1" ).arg( x ) );
|
||||
QgsDebugMsg( QString( " y : %1" ).arg( y ) );
|
||||
@ -505,7 +505,7 @@ void QgsCoordinateTransform::transformCoords( const int& numPoints, double *x, d
|
||||
// if the result is lat/long, convert the results from radians back
|
||||
// to degrees
|
||||
if (( pj_is_latlong( mDestinationProjection ) && ( direction == ForwardTransform ) )
|
||||
|| ( pj_is_latlong( mSourceProjection ) && ( direction == INVERSE ) ) )
|
||||
|| ( pj_is_latlong( mSourceProjection ) && ( direction == ReverseTransform ) ) )
|
||||
{
|
||||
for ( int i = 0; i < numPoints; ++i )
|
||||
{
|
||||
|
@ -92,7 +92,7 @@ class CORE_EXPORT QgsCoordinateTransform: public QObject
|
||||
enum TransformDirection
|
||||
{
|
||||
ForwardTransform, /*!< Transform from source to destination CRS. */
|
||||
INVERSE /*!< Transform from destination to source CRS. */
|
||||
ReverseTransform /*!< Transform from destination to source CRS. */
|
||||
};
|
||||
|
||||
/*!
|
||||
|
@ -518,10 +518,10 @@ bool QgsMapRenderer::splitLayersExtent( QgsMapLayer* layer, QgsRect& extent, Qgs
|
||||
// Note: ll = lower left point
|
||||
// and ur = upper right point
|
||||
QgsPoint ll = tr.transform( extent.xMin(), extent.yMin(),
|
||||
QgsCoordinateTransform::INVERSE );
|
||||
QgsCoordinateTransform::ReverseTransform );
|
||||
|
||||
QgsPoint ur = tr.transform( extent.xMax(), extent.yMax(),
|
||||
QgsCoordinateTransform::INVERSE );
|
||||
QgsCoordinateTransform::ReverseTransform );
|
||||
|
||||
if ( ll.x() > ur.x() )
|
||||
{
|
||||
@ -531,12 +531,12 @@ bool QgsMapRenderer::splitLayersExtent( QgsMapLayer* layer, QgsRect& extent, Qgs
|
||||
}
|
||||
else // no need to split
|
||||
{
|
||||
extent = tr.transformBoundingBox( extent, QgsCoordinateTransform::INVERSE );
|
||||
extent = tr.transformBoundingBox( extent, QgsCoordinateTransform::ReverseTransform );
|
||||
}
|
||||
}
|
||||
else // can't cross 180
|
||||
{
|
||||
extent = tr.transformBoundingBox( extent, QgsCoordinateTransform::INVERSE );
|
||||
extent = tr.transformBoundingBox( extent, QgsCoordinateTransform::ReverseTransform );
|
||||
}
|
||||
}
|
||||
catch ( QgsCsException &cse )
|
||||
@ -601,7 +601,7 @@ QgsPoint QgsMapRenderer::mapToLayerCoordinates( QgsMapLayer* theLayer, QgsPoint
|
||||
try
|
||||
{
|
||||
QgsCoordinateTransform tr( theLayer->srs(), *mDestCRS );
|
||||
point = tr.transform( point, QgsCoordinateTransform::INVERSE );
|
||||
point = tr.transform( point, QgsCoordinateTransform::ReverseTransform );
|
||||
}
|
||||
catch ( QgsCsException &cse )
|
||||
{
|
||||
@ -623,7 +623,7 @@ QgsRect QgsMapRenderer::mapToLayerCoordinates( QgsMapLayer* theLayer, QgsRect re
|
||||
try
|
||||
{
|
||||
QgsCoordinateTransform tr( theLayer->srs(), *mDestCRS );
|
||||
rect = tr.transform( rect, QgsCoordinateTransform::INVERSE );
|
||||
rect = tr.transform( rect, QgsCoordinateTransform::ReverseTransform );
|
||||
}
|
||||
catch ( QgsCsException &cse )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user