[QGIS Commit] r9498 - in trunk/qgis: python/core src/core
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Sun Oct 19 16:16:08 EDT 2008
Author: timlinux
Date: 2008-10-19 16:16:08 -0400 (Sun, 19 Oct 2008)
New Revision: 9498
Modified:
trunk/qgis/python/core/qgscoordinatetransform.sip
trunk/qgis/src/core/qgscoordinatetransform.cpp
trunk/qgis/src/core/qgscoordinatetransform.h
trunk/qgis/src/core/qgsmaprenderer.cpp
Log:
Fix naming of reverse coordinate transform enum
Modified: trunk/qgis/python/core/qgscoordinatetransform.sip
===================================================================
--- trunk/qgis/python/core/qgscoordinatetransform.sip 2008-10-19 19:52:34 UTC (rev 9497)
+++ trunk/qgis/python/core/qgscoordinatetransform.sip 2008-10-19 20:16:08 UTC (rev 9498)
@@ -57,7 +57,7 @@
//! 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. */
};
/*!
Modified: trunk/qgis/src/core/qgscoordinatetransform.cpp
===================================================================
--- trunk/qgis/src/core/qgscoordinatetransform.cpp 2008-10-19 19:52:34 UTC (rev 9497)
+++ trunk/qgis/src/core/qgscoordinatetransform.cpp 2008-10-19 20:16:08 UTC (rev 9498)
@@ -436,7 +436,7 @@
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 @@
}
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 @@
// 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 )
{
Modified: trunk/qgis/src/core/qgscoordinatetransform.h
===================================================================
--- trunk/qgis/src/core/qgscoordinatetransform.h 2008-10-19 19:52:34 UTC (rev 9497)
+++ trunk/qgis/src/core/qgscoordinatetransform.h 2008-10-19 20:16:08 UTC (rev 9498)
@@ -92,7 +92,7 @@
enum TransformDirection
{
ForwardTransform, /*!< Transform from source to destination CRS. */
- INVERSE /*!< Transform from destination to source CRS. */
+ ReverseTransform /*!< Transform from destination to source CRS. */
};
/*!
Modified: trunk/qgis/src/core/qgsmaprenderer.cpp
===================================================================
--- trunk/qgis/src/core/qgsmaprenderer.cpp 2008-10-19 19:52:34 UTC (rev 9497)
+++ trunk/qgis/src/core/qgsmaprenderer.cpp 2008-10-19 20:16:08 UTC (rev 9498)
@@ -518,10 +518,10 @@
// 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 @@
}
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 @@
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 @@
try
{
QgsCoordinateTransform tr( theLayer->srs(), *mDestCRS );
- rect = tr.transform( rect, QgsCoordinateTransform::INVERSE );
+ rect = tr.transform( rect, QgsCoordinateTransform::ReverseTransform );
}
catch ( QgsCsException &cse )
{
More information about the QGIS-commit
mailing list