[GRASS-user] error in r.fillnull

Glynn Clements glynn at gclements.plus.com
Tue Mar 31 19:35:56 EDT 2009


Markus Neteler wrote:

> > 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,

Someone should file a bug report along the lines of "v.info lacks a -g
switch".

All info/report modules should have an option to produce
machine-readable output.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-user mailing list