[GRASS5] Re: [bug #3023] (grass) r.fillnulls doesn't work

Maciek Sieczka werchowyna at pf.pl
Wed Mar 2 06:50:48 EST 2005


From: "Hamish via RT" <grass-bugs at intevation.de>
Subject: [bug #3023] (grass) r.fillnulls doesn't work


>> >> r.fillnulls fails in such a way:
>> >>
>> >> GRASS 6.0.cvs:~ > r.fillnulls input=N51E016_nowy
>> >> output=N51E016_nowy.fld Using tmp file r_fillnulls_4707
>> >> Locating and isolating NULL areas...
>> >>  100%
>> >> r.buffer: 00000000 - illegal distance specification
>> >
> ..
>> > what do you get if you type this at a command prompt:
>> >
>> > echo "0.3 0.3" | awk '{printf "%.8f\n", ($1 + $2)}'
>> > 00000000 or 0.60000000 ?
>>
>> Neither:
>>
>> GRASS 6.0.cvs:~ > echo "0.3 0.3" | awk '{printf "%.8f\n", ($1 + $2)}'
>> 0,00000000
>>
>> "," instead of "." - would that be the issue? I Poland, in opposite to
>> the  normal world, we use the coma as the decimal point deliminator.
>> Does  r.fillnulls rely on local system settings?
>
>
> Yes, that's the problem.
>
> I think awk might have troubles too. does this give "0,6":
> echo "0,3 0,3" | awk '{printf "%.8f\n", ($1 + $2)}'
> ?

No, it still gives me "0,00000000".

> We can't assume "bc" or "dc" are installed, but come to think of it we
> are using an arbitrary buffer distance here anyway so it doesn't really
> matter if we are +/- 1m. I've just applied a fix in CVS removing the
> above "awk" step. please test.

I have tried it with N51E016 and the filled raster looks ok. No more errors
printed. Thanks Hamish.

Maciek




More information about the grass-dev mailing list