[GRASS-dev] Re: Profiler updates

Michael Barton michael.barton at asu.edu
Tue Feb 13 10:00:30 EST 2007


The reason that the profiler can get coordinates from outside the region is
that it is possible, using the zoom box tool, to create a region whose
geometry does not exactly match the geometry of the display window. There
are good and bad sides to this (the profile issue being one of bads,
apparently), but it is a function of GRASS's sophisticated region setting
abilities--i.e., these are not inherently tied to visualization and do
affect computations. Initially a pain for users accustomed to other
programs, most people come to appreciate the power of GRASS's region
management features...eventually. ;-)

So much for background. It is of course possible to do something to alert
the user when the profiling cursor strays outside region boundaries. But
most such 'solutions' I can imagine could easily get very annoying for
interactive use. (Maybe I'll have better imagination later today after a
couple cups of coffee)

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.

Michael


On 2/13/07 1:26 AM, "Maris Nartiss" <maris.gis at gmail.com> wrote:

> Hi gis.m bug fighters, comments inline.
> 
> 2007/2/13, Hamish <hamish_nospam at yahoo.com>:
>> Hamish:
>>> This is a bug in r.profile. Out of region values are not correct.
>> 
>> fixed in 6.2 and 6.3 cvs.
>> 
>> 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.
> This should be fixed before 6.3.
> 
>> 
>>> 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. I'm not
> as good in tcl/tk to send patch, but just questions:
> * would it be possible to resize drawable area to region in gis.m
> display? (one way how to deal with user working outside of defined
> region)
> * or maybee we should add region boundary checking in measure/query
> tools? Then only question is - what to do if user HAS clicked outside
> region?
> 
>> 
>> Hamish
>> 
> 
> I care about gis.m cause IMHO till next stable release new GUI will
> NOT be production ready and gis.m is really good, we should just make
> it also user frendly and foolproof to provide excelent UI expierience.
> 
> Maris.

__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton





More information about the grass-dev mailing list