[GRASS5] bug in d.what.rast
Eric G. Miller
egm2 at jps.net
Sat Mar 2 23:01:22 EST 2002
On Sat, Mar 02, 2002 at 07:35:14PM -0700, Roger Miller wrote:
>
> Folks,
>
> d.what.rast in GRASS pre2 is broken. The -c flag produces incorrect
> results. The problem was introduced somewhere between beta11 and
> pre2. The beta11 version works. I did track down exactly what the
> problem was, and it looks like it's still there in the current
> version.
>
> Briefly, the definition of the show_utm function was modified to pass
> the name of the mapset as an argument. That causes show_utm to skip
> the call to G_get_cellhd that fills the cellhd structure; the column
> and row numbers are then calculated on the basis of cellhd.north =
> cellhd.west = 0.
>
> The easiest solution is just to revert the code to the earlier
> version.
The changelog seems to indicate there was a problem before. So,
maybe what's needed is just to move the G_get_cellhd() function
call after the if(!mapset){...}, which seems to be the error..
I'm not sure if there's a good reason for cellhd to be static
either... ??
--
Eric G. Miller <egm2 at jps.net>
More information about the grass-dev
mailing list