[GRASS-dev] Re: Profiler updates

Hamish hamish_nospam at yahoo.com
Tue Feb 13 18:19:42 EST 2007


Hamish:
> >>> 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.

Maris:
> > IMHO we should better fix gis.m from working OUTSIDE region.

Michael wrote:
> 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.


Hamish:
> >> 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
too.


Hamish




More information about the grass-dev mailing list