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

Maciek Sieczka werchowyna at pf.pl
Fri Feb 25 08:42:29 EST 2005


From: "Hamish via RT" <grass-bugs at intevation.de>
Subject: [bug #3023] (grass) r.fillnulls doesn't work
this bug's URL: http://intevation.de/rt/webrt?serial_num=3023

>> >> I'm reffering here to a single 3" SRTM tile loaded using r.in.srtm.
>> >>
>> >> r.fillnulls works very long and uses so much swap that mouse stops
>> >> answering, temporarily, after several minutes.
>
> ...?

>> GRASS 6.0.cvs:~ > g.region rast=N51E016 -ap
>> projection: 3 (Latitude-Longitude)
>> zone:       0
>> datum:      wgs84
>> ellipsoid:  wgs84
>> north:      52:00:01.5N
>> south:      50:59:58.5N
>> west:       15:59:58.5E
>> east:       17:00:01.5E
>> nsres:      0:00:03
>> ewres:      0:00:03
>> rows:       1201
>> cols:       1201

> looks ok.

>> GRASS 6.0.cvs:~ > g.region -g
>> n=52.00041667
>> s=50.99958333
>> w=15.99958333
>> e=17.00041667
>> nsres=0.00083333
>> ewres=0.00083333

> that looks ok too.  The buffer distance is supposed to be nsres+ewres.
> This was fixed to work with floating point resolutions (i.e. lat/lon)
> before 6beta2 was released.

>> > I've just added some more error checking in CVS, can you update and
>> > try again?  maybe uncomment "echo RES=.." line?
>> > (It won't fix your problem but will stop the script if this step
>> > fails.)

> http://freegis.org/cgi-bin/viewcvs.cgi/*checkout*/grass6/scripts/r.in.srtm/r.in.srtm?rev=HEAD&content-type=text/plain
>
> http://freegis.org/cgi-bin/viewcvs.cgi/*checkout*/grass6/scripts/r.fillnulls/r.fillnulls?rev=HEAD&content-type=text/plain
>
> then run "make" from within the modules' directory. (+ install?)
> both scripts have new bugfixes and extra checks. can you test them?

Ok, I dowlnloaded them but didn't rebuild, just copied into my Grass6 
directory. These are scripts, I don't have to rebuild, right?

r.in.srtm works ok now, thanks.

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

Description:
 Creates a raster map layer showing buffer zones surrounding cells that 
contain
non-NULL category values.

Usage:
 r.buffer [-qz] input=value output=name distances=value[,value,...]
   [units=name]

Flags:
  -q   Run quietly
  -z   Ignore zero (0) data cells instead of NULL cells

Parameters:
      input   Name of input map
     output   Name of output map
  distances   Distance zone(s)
      units   Units of distance
              options: meters,kilometers,feet,miles,nautmiles
              default: meters
ERROR detected: /usr/local/grass-6.0.cvs/scripts/r.fillnulls abandoned. 
Removing                        temporary map:
REMOVE [r_fillnulls_4707]
 raster
 header
 category
 color    MISSING
 history
 misc
 fcell    MISSING
 g3dcell  MISSING
ERROR: <mask_4707> not found

my region was:

GRASS 6.0.cvs:~ > g.region rast=N51E016_nowy -ap
projection: 3 (Latitude-Longitude)
zone:       0
datum:      wgs84
ellipsoid:  wgs84
north:      52:00:01.5N
south:      50:59:58.5N
west:       15:59:58.5E
east:       17:00:01.5E
nsres:      0:00:03
ewres:      0:00:03
rows:       1201
cols:       1201

> .. pretty much everything will be broken after the r.buffer step fails.
> Please try again with the two updated scripts.

As you said...

Maciek 




More information about the grass-dev mailing list