aboutsummaryrefslogtreecommitdiff
path: root/src/pj_transform.c
diff options
context:
space:
mode:
authorFrank Warmerdam <warmerdam@pobox.com>2006-02-17 02:26:14 +0000
committerFrank Warmerdam <warmerdam@pobox.com>2006-02-17 02:26:14 +0000
commit9990608a8f73ad884aa1b21bc76a3c6fb44d3382 (patch)
treece46f8248ca373ebdad6c4d9cf6094466343f860 /src/pj_transform.c
parent8a4b9cee5afeea1e91470399a7be46a987688f4f (diff)
downloadPROJ-9990608a8f73ad884aa1b21bc76a3c6fb44d3382.tar.gz
PROJ-9990608a8f73ad884aa1b21bc76a3c6fb44d3382.zip
ERANGE/EDOM treated as transient errors
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1323 4e78687f-474d-0410-85f9-8d5e500ac6b2
Diffstat (limited to 'src/pj_transform.c')
-rw-r--r--src/pj_transform.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/pj_transform.c b/src/pj_transform.c
index 4934914f..55ed8431 100644
--- a/src/pj_transform.c
+++ b/src/pj_transform.c
@@ -30,6 +30,9 @@
******************************************************************************
*
* $Log$
+ * Revision 1.16 2006/02/17 02:26:14 fwarmerdam
+ * ERANGE/EDOM treated as transient errors
+ *
* Revision 1.15 2005/12/04 14:47:37 fwarmerdam
* use symbolic names as per patch from Martin Vermeer
*
@@ -209,8 +212,9 @@ int pj_transform( PJ *srcdefn, PJ *dstdefn, long point_count, int point_offset,
geodetic_loc = pj_inv( projected_loc, srcdefn );
if( pj_errno != 0 )
{
- if( pj_errno > 0 || pj_errno < -44 || point_count == 1
- || transient_error[-pj_errno] == 0 )
+ if( (pj_errno != 33 /*EDOM*/ && pj_errno != 34 /*ERANGE*/ )
+ && (pj_errno > 0 || pj_errno < -44 || point_count == 1
+ || transient_error[-pj_errno] == 0 ) )
return pj_errno;
else
{
@@ -304,8 +308,9 @@ int pj_transform( PJ *srcdefn, PJ *dstdefn, long point_count, int point_offset,
projected_loc = pj_fwd( geodetic_loc, dstdefn );
if( pj_errno != 0 )
{
- if( pj_errno > 0 || pj_errno < -44 || point_count == 1
- || transient_error[-pj_errno] == 0 )
+ if( (pj_errno != 33 /*EDOM*/ && pj_errno != 34 /*ERANGE*/ )
+ && (pj_errno > 0 || pj_errno < -44 || point_count == 1
+ || transient_error[-pj_errno] == 0 ) )
return pj_errno;
else
{