Opened 15 years ago

Closed 10 years ago

#383 closed defect (fixed)

change fprintf to G_debug in do_proj.c

Reported by: quinn Owned by: grass-dev@…
Priority: trivial Milestone: 6.4.4
Component: Raster Version: 6.2.3
Keywords: Cc:
CPU: All Platform: All

Description

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;
 }

Change History (4)

comment:1 by hamish, 15 years ago

Milestone: 6.4.0

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

comment:2 by neteler, 14 years ago

Can this be closed?

comment:3 by neteler, 12 years ago

Milestone: 6.4.06.4.4

See also ticket #429

comment:4 by martinl, 10 years ago

Resolution: fixed
Status: newclosed

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

Note: See TracTickets for help on using tickets.