[GRASS-dev] Re: Profiler updates
hamish_nospam at yahoo.com
Wed Feb 14 00:19:42 CET 2007
> >>> r.profile out-of-region should report a "NULL" result (to stdout)
> >>> and warning that the endpoint is out of region (G_warning() to
> >>> stderr). up for discussion. harder to do.
> > IMHO we should better fix gis.m from working OUTSIDE region.
> IMHO, r.profile should simply report NULL values for any coordinates
> that fall outside the region--like many other tools that return
> information about raster cells. This could easily be trapped and dealt
> with in the profiler. Unfortunately, Hamish indicates that this is
> difficult to implement.
Just "harder to do", but not super difficult. I think I agree that out-
of-region shouldn't G_fatal_error(), so I'll work on it.
Example: you use a fixed transect line and apply it to different maps
with different spatial coverage. Off the end of a map is an unknown
value, which is typically represented by a NULL.
> >> Now it exits with G_fatal_error() if a coordinate is outside of the
> >> current region. (exit code 1)
> >> gis.m still doesn't catch this, and dies with a "child process
> >> exited abnormally" error. But at least it no longer outputs garbage
> >> data.
Even if I have it report NULLs instead of exit with an error this
problem will remain and anytime r.profile exits abnormally it will bring
down all of gis.m. So we should figure out why this is happening and fit
it as well -- the same bug & fragility may exist in many other places
More information about the grass-dev