Opened 11 years ago

Closed 6 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 Changed 11 years ago by hamish

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 Changed 10 years ago by neteler

Can this be closed?

comment:3 Changed 7 years ago by neteler

Milestone: 6.4.06.4.4

See also ticket #429

comment:4 Changed 6 years ago by martinl

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.