[GRASS-dev] [GRASS GIS] #383: change fprintf to G_debug in do_proj.c

GRASS GIS trac at osgeo.org
Tue Nov 25 20:26:27 EST 2008


#383: change fprintf to G_debug in do_proj.c
---------------------+------------------------------------------------------
 Reporter:  quinn    |       Owner:  grass-dev at lists.osgeo.org
     Type:  defect   |      Status:  new                      
 Priority:  trivial  |   Milestone:                           
Component:  Raster   |     Version:  6.2.3                    
 Keywords:           |    Platform:  All                      
      Cpu:  All      |  
---------------------+------------------------------------------------------
 If you use r.proj to project between coordinate systems that don't
 share all points, you get many errors to STDERR, for each projection
 failure.  I'm not sure that's necessarily an error, and I suggest the
 notice be sent to G_debug.

 {{{
  --- grass-6.2.3.orig/lib/proj/do_proj.c
  +++ grass-6.2.3/lib/proj/do_proj.c
  @@ -104,8 +104,7 @@
        }
     }     if (ok < 0) {
  -       fprintf(stderr, "pj_transform() failed\ncause: ");
  -       fprintf(stderr, "%s\n", pj_strerrno(ok));
  +      G_debug(5,"pj_transform() failed in pj_do_proj\ncause: %s\n",
 pj_strerrno(ok));
     }
     return ok;
  }
  @@ -178,8 +177,7 @@
        G_free(h);
      if (ok < 0) {
  -       fprintf(stderr, "pj_transform() failed\ncause: ");
  -       fprintf(stderr, "%s\n", pj_strerrno(ok));
  +      G_debug(5,"pj_transform() failed in pj_do_transform\ncause:
 %s\n",pj_strerrno(ok));
     }
     return ok;
  }
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/383>
GRASS GIS <http://grass.osgeo.org>


More information about the grass-dev mailing list