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

#383: change fprintf to G_debug in do_proj.c
---------------------+------------------------------------------------------
Reporter: quinn | Owner: grass-dev@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&gt;
GRASS GIS <http://grass.osgeo.org>

#383: change fprintf to G_debug in do_proj.c
----------------------+-----------------------------------------------------
  Reporter: quinn | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: trivial | Milestone: 6.4.0
Component: Raster | Version: 6.2.3
Resolution: | Keywords:
  Platform: All | Cpu: All
----------------------+-----------------------------------------------------
Changes (by hamish):

  * milestone: => 6.4.0

Comment:

note that in newer SVN fprintf(stderr, has been replaced by G_warning(),
but that will still be displayed multiple times and there is no way to
turn it off. Also, I think that G_debug(5, will make it too hidden.

Can you give an example of what you mean by "project between coordinate
systems that don't share all points"?

Hamish

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/383#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#383: change fprintf to G_debug in do_proj.c
----------------------+-----------------------------------------------------
  Reporter: quinn | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: trivial | Milestone: 6.4.0
Component: Raster | Version: 6.2.3
Resolution: | Keywords:
  Platform: All | Cpu: All
----------------------+-----------------------------------------------------
Comment (by neteler):

Can this be closed?

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/383#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#383: change fprintf to G_debug in do_proj.c
---------------------+------------------------------------------------------
Reporter: quinn | Owner: grass-dev@…
     Type: defect | Status: new
Priority: trivial | Milestone: 6.4.4
Component: Raster | Version: 6.2.3
Keywords: | Platform: All
      Cpu: All |
---------------------+------------------------------------------------------
Changes (by neteler):

  * milestone: 6.4.0 => 6.4.4

Comment:

See also ticket #429

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/383#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#383: change fprintf to G_debug in do_proj.c
----------------------+-----------------------------------------------------
  Reporter: quinn | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: trivial | Milestone: 6.4.4
Component: Raster | Version: 6.2.3
Resolution: fixed | Keywords:
  Platform: All | Cpu: All
----------------------+-----------------------------------------------------
Changes (by martinl):

  * status: new => closed
  * resolution: => fixed

Comment:

Bug seems to be fixed, no answer within 4 years. Taking liberty to close
it.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/383#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>