[GRASS5] [bug #4311] (grass) shaded relief parameter checking

Michael Barton michael.barton at asu.edu
Wed Apr 19 23:41:52 EDT 2006


I see it now. It wasn't clear to me in the bug report.

Thanks for fixing it.

Michael
__________________________________________
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



> From: Hamish <hamish_nospam at yahoo.com>
> Date: Thu, 20 Apr 2006 15:32:16 +1200
> To: Michael Barton <michael.barton at asu.edu>
> Cc: <grass-bugs at intevation.de>, <grass5 at grass.itc.it>
> Subject: Re: [GRASS5] [bug #4311] (grass) shaded relief parameter checking
> 
>>> this bug's URL: http://intevation.de/rt/webrt?serial_num=4311
>>> -------------------------------------------------------------------
>>> ------
>>> 
>>> Subject: shaded relief parameter checking
> ..
>>> There is a bug in r.shaded.relief where the input parameters are
>>> checked, especially the azimuth.
>>> 
>>> the current version reads:
>>> ================
>>> if test $alt -lt 0 -o $alt -gt 90
>>> then
>>>         echo "Sorry, altitude must be greater than 0 and less than
>>>         90"
>> 
>> changed to "Sorry, altitude must be between 0 and 90"
>> 
>>>         exit 1
>>> fi
>>> 
>>> if test $az -lt 0 -o $alt -gt 360
> 
>            ^^^^          ^^^^
> actually this was the error.
> 
>>> then
>>>         echo "Sorry, azimuth must be between 0 and 360"
>>>         exit 1
>>> fi
> 
> 
> Anyway, those checks should have been in the parameter setup as
> #% options : 0-90
> to let the parser do its job.
> 
> so I've moved them there for both 6.1 and 6.0.x CVS branches.
> 
> For this module out-of-bounds values don't fail, so 0-90 or 1-89 really
> didn't matter to the output. I think the description was changed to
> odd numbers to reflect the broken >,< tests?
> 
> also did a few more cleanups in the 6.1 branch. (record metadata, etc)
> 
> 
> Hamish




More information about the grass-dev mailing list