[GRASS-user] error in r.fillnull

Markus Neteler neteler at osgeo.org
Tue Mar 31 17:26:43 EDT 2009


2009/3/31 Martin Schweizer <schweizermartin at students.unibe.ch>:
> Hi
>
> I have the following Problem: I like to fill some NULL areas in a raster
> map. This is the outcome:
>
>
> GRASS 6.4.0RC3 (Romanum5):~ > r.fillnulls input=Hangneigung output=Hang0
...
> r.to.vect komplett.
> Interpolating points
> /opt/grass/scripts/r.fillnulls: line 184: [: -lt: unary operator expected
> Note: The following warnings may be ignored.
> Removing raster <MASK>
> /opt/grass/scripts/r.fillnulls: line 216: [: -ge: unary operator expected

Ah, too bad - this is a problem of using a non-English locale!
The code above line 184 looks like this:

POINTSNUMBER="`v.info map=${VECTTMP} | grep 'Number of points' | awk
'{print $5}'`"

Since it searches for 'Number of points' but gets in German locale
'Anzahl Punkte'
not a single point is found. The correct line is

POINTSNUMBER="`v.info -t map=${VECTTMP} | grep points | cut -d'=' -f2`"

You may just edit the script locally to fix that.

Found the same in v.centroids, both fixed in 6.4.svn, 6.5, and 7.
Thanks for reporting it,

Markus


More information about the grass-user mailing list