diff options
| author | Frank Warmerdam <warmerdam@pobox.com> | 2006-05-01 21:13:54 +0000 |
|---|---|---|
| committer | Frank Warmerdam <warmerdam@pobox.com> | 2006-05-01 21:13:54 +0000 |
| commit | b4f02cf97e634550be6994f4d0f13b82d57abcd7 (patch) | |
| tree | 0efda252b98868704c537bcc9b34e88af8acdffe /src/pj_transform.c | |
| parent | 3eae56dd65d9b57fb04281a3c4e75276113cdc54 (diff) | |
| download | PROJ-b4f02cf97e634550be6994f4d0f13b82d57abcd7.tar.gz PROJ-b4f02cf97e634550be6994f4d0f13b82d57abcd7.zip | |
make out of range errors in geodetic to geocentric a transient error
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1335 4e78687f-474d-0410-85f9-8d5e500ac6b2
Diffstat (limited to 'src/pj_transform.c')
| -rw-r--r-- | src/pj_transform.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/pj_transform.c b/src/pj_transform.c index b41d241f..087d7fb1 100644 --- a/src/pj_transform.c +++ b/src/pj_transform.c @@ -30,6 +30,9 @@ ****************************************************************************** * * $Log$ + * Revision 1.18 2006/05/01 21:13:54 fwarmerdam + * make out of range errors in geodetic to geocentric a transient error + * * Revision 1.17 2006/03/20 17:54:34 fwarmerdam * pj_geodetic_to_geocentric returns -14 now for lat out of range * @@ -342,6 +345,8 @@ int pj_geodetic_to_geocentric( double a, double es, double b; int i; + pj_errno = 0; + if( es == 0.0 ) b = a; else @@ -364,11 +369,12 @@ int pj_geodetic_to_geocentric( double a, double es, x+io, y+io, z+io ) != 0 ) { pj_errno = -14; - return -14; + x[io] = y[io] = HUGE_VAL; + /* but keep processing points! */ } } - return 0; + return pj_errno; } /************************************************************************/ @@ -591,7 +597,7 @@ int pj_datum_transform( PJ *srcdefn, PJ *dstdefn, z_is_temp = TRUE; } -#define CHECK_RETURN {if( pj_errno != 0 ) { if( z_is_temp ) pj_dalloc(z); return pj_errno; }} +#define CHECK_RETURN {if( pj_errno != 0 && (pj_errno > 0 || transient_error[-pj_errno] == 0) ) { if( z_is_temp ) pj_dalloc(z); return pj_errno; }} /* -------------------------------------------------------------------- */ /* If this datum requires grid shifts, then apply it to geodetic */ |
