aboutsummaryrefslogtreecommitdiff
path: root/src/pj_apply_gridshift.c
diff options
context:
space:
mode:
authorFrank Warmerdam <warmerdam@pobox.com>2002-04-30 16:27:27 +0000
committerFrank Warmerdam <warmerdam@pobox.com>2002-04-30 16:27:27 +0000
commit163bcc6f01dca1a51b67f95161544ea0f54fcb82 (patch)
tree22803f7eebcc28f25be586a33078cb929984a607 /src/pj_apply_gridshift.c
parent7bab5f06755d2a5b11a6758b71984f472563a987 (diff)
downloadPROJ-163bcc6f01dca1a51b67f95161544ea0f54fcb82.tar.gz
PROJ-163bcc6f01dca1a51b67f95161544ea0f54fcb82.zip
improve debug output
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1009 4e78687f-474d-0410-85f9-8d5e500ac6b2
Diffstat (limited to 'src/pj_apply_gridshift.c')
-rw-r--r--src/pj_apply_gridshift.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/pj_apply_gridshift.c b/src/pj_apply_gridshift.c
index 5a9232b7..61a5944b 100644
--- a/src/pj_apply_gridshift.c
+++ b/src/pj_apply_gridshift.c
@@ -31,6 +31,9 @@
******************************************************************************
*
* $Log$
+ * Revision 1.3 2002/04/30 16:27:27 warmerda
+ * improve debug output
+ *
* Revision 1.2 2001/03/15 16:57:55 warmerda
* fixed intermittent problem in pj_load_nadgrids()
*
@@ -215,7 +218,10 @@ static struct CTABLE **pj_load_nadgrids( const char *nadgrids )
last_nadgrids_list[nadgrids_count] = pj_get_grid( name );
if( last_nadgrids_list[nadgrids_count] == NULL )
+ {
+ pj_errno = -38;
return NULL;
+ }
nadgrids_count++;
}
@@ -259,6 +265,17 @@ int pj_apply_gridshift( const char *nadgrids, int inverse,
if( output.lam == HUGE_VAL )
{
+ if( getenv( "PROJ_DEBUG" ) != NULL )
+ {
+ fprintf( stderr,
+ "pj_apply_gridshift(): failed to find a grid shift table for\n"
+ " location (%.7fdW,%.7fdN)\n",
+ x[io] * RAD_TO_DEG,
+ y[io] * RAD_TO_DEG );
+ fprintf( stderr,
+ " tried: %s\n", nadgrids );
+ }
+
pj_errno = -38;
return pj_errno;
}