[GRASS5] [bug #3742] (grass) r.out.bin output incorrect
compared with r.out.netcdf
Hamish
hamish_nospam at yahoo.com
Tue Oct 18 19:02:38 EDT 2005
> > > Subject: r.out.bin output incorrect compared with r.out.netcdf
..
> > > > []% r.out.bin -h null=NaN in=srtm out=srtm.grd
> >
> > note null=NaN should not work [yet it does! G_parser bug!].
>
> G_parser() doesn't actually check that argument values are legitimate
> unless the ->options field is non-null.
I didn't know that. Ok, it's just a string.
Should it be testing the string against opt->type? (,opt->multiple)
(ie is there a reason not to do so, or has it just not been done yet?)
> > As written r.out.bin will only take an integer for the null value at
> > the command line.
...
> r.out.bin doesn't check the return value from sscanf().
I've already added that test in CVS/HEAD.
Glynn, I was hoping you would know the answer to the outstanding GMT
header code byteswap question?
/* Set up Parameters for GMT header */
if (flag.gmt_hd->answer) {
...
if (flag.swap->answer)
TIFFSwabLong((uint32 *) & null_str);
sprintf(buf, "%d", null_str);
...
}
does this pollute null_str byteswapping later on in the code?
(ie swapping an already swapped variable)
also should that (and the rest of the code) test be
if (swapFlag)
not
if (flag.swap->answer)
or should "swapFlag" be renamed something better?
The mix & match of using both has gotten me a bit confused, hopefully
it is all ok.
Hamish
More information about the grass-dev
mailing list