Details Ticket 3023


Comment | Reply | Take | Open


Serial Number 3023
Subject r.fillnulls doesn't work
Area grass5.7
Queue grass
Requestors werchowyna@pf.pl
Owner none
Status resolved
Last User Contact Fri Mar 4 10:38:24 2005 (3 yr ago)
Current Priority 30
Final Priority 70
Due No date assigned
Last Action Thu May 12 15:12:10 2005 (3 yr ago)
Created Tue Feb 22 23:35:52 2005 (4 yr ago)

Transaction History Ticket 3023


Tue, Feb 22 2005 23:35:52    Request created by guest  
Subject: r.fillnulls doesn't work

Platform: GNU/Linux/i386
grass obtained from: Mirror of Trento site
grass binary for platform: Compiled from Sources
GRASS Version: grass-6.0.cvs_src_snapshot_2005_02_12

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.

Several error infos are printed (see below) and finally r.fillnulls fails to
produce anything - in spite of claiming to have "Filled raster map is: N51E016_flnull".
Details:

r.fillnulls input=N51E016 output=N51E016_flnull tension=40. smooth=0.1 
Using tmp file r_fillnulls_5276
Locating and isolating NULL areas...
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
invalid map: r_fillnulls_5276.buf
Syntax error
Creating interpolation points...

GRASS_INFO_WARNING(5297,1): Default driver / database set to:
GRASS_INFO_WARNING(5297,1): driver: dbf
GRASS_INFO_WARNING(5297,1): database: $GISDBASE/$LOCATION_NAME/$MAPSET/dbf/
/usr/local/grass-6.0.cvs/scripts/r.fillnulls: line 128:  5297 Broken pipe   
r.to.vect input=$GIS_OPT_input output=vecttmp_fillnulls_$$ feature=point

Cannot open old vector vecttmp_fillnulls_5276@PERMANENT on level 2
GRASS_INFO_END(5441,1)

Interpolating  points

/usr/local/grass-6.0.cvs/scripts/r.fillnulls: line 138: [: -lt: unary operator
expected

Note: Below warnings may be ignored.

/usr/local/grass-6.0.cvs/scripts/r.fillnulls: line 166: [: -ge: unary operator
expected
Using no segmentation for interpolation as not needed...

GRASS_INFO_WARNING(5449,1): coor files of vector 'vecttmp_fillnulls_5276@PERMANENT'
is larger than it should be (39860630 bytes excess).

You first need to run v.build on vector file <vecttmp_fillnulls_5276>

Authors: original version -  H.Mitasova, L.Mitas, I. Kosinovsky, D.P. Gerdes
See manual pages for reference and publications
------------------------------------
Note: Above warnings may be ignored.

Patching fill data into NULL areas...
r.patch - rfillnulls_r_fillnulls_5276 not found

GRASS_INFO_WARNING(5453,1): Table 'vecttmp_fillnulls_5276' linked to vector did
not exist.

Filled raster map is: N51E016_flnull

Done.
Wed, Feb 23 2005 01:02:52    Mail sent by hamish_nospam@yahoo.com  
Return-Path <hamish_nospam@yahoo.com>
Delivered-To grass-bugs@lists.intevation.de
Date Wed, 23 Feb 2005 13:02:39 +1300
From Hamish <hamish_nospam@yahoo.com>
To Request Tracker <grass-bugs@intevation.de>
Cc grass5@grass.itc.it
Subject Re: [GRASS5] [bug #3023] (grass) r.fillnulls doesn't work
Message-Id <20050223130239.77a787bf.hamish_nospam@yahoo.com>
In-Reply-To <20050222223552.AEFA0102C44@lists.intevation.de>
References <20050222223552.AEFA0102C44@lists.intevation.de>
X-Mailer Sylpheed version 1.0.0 (GTK+ 1.2.10; i386-pc-linux-gnu)
X-Face M<EoB)"*Z~u!,vFhXmw}R_KbdBta*P_=T|rbBL'e1/CQ9;/1g\BU3&!=y8ria$2Uk!HT&BB 8i?|X_+7~1jsy}F~g$2va%3fV`*=L(*cem[@3\yg,G,@rg6/QMJ
Mime-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
X-Spam-Status No, hits=-4.0 tagged_above=-999.0 required=3.0 tests=BAYES_00, FORGED_YAHOO_RCVD
X-Spam-Level
> this bug's URL: http://intevation.de/rt/webrt?serial_num=3023
> ---------------------------------------------------------------------
> 
> Subject: r.fillnulls doesn't work

(works fine for me on 6.0beta2)


> GRASS Version: grass-6.0.cvs_src_snapshot_2005_02_12
> 
> 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.

at which point in the script? Here it takes a couple minutes to run,
long part is duing the v.surf.rst step but no runaway memory issues.
run "top" in another window to watch what is going on?

What is your region set to?
try 'g.region rast=(map)' first?

 
> Several error infos are printed (see below) and finally r.fillnulls
> fails to produce anything - in spite of claiming to have "Filled
> raster map is: N51E016_flnull".
> 
> Details:
> 
> r.fillnulls input=N51E016 output=N51E016_flnull tension=40. smooth=0.1
> 
> Using tmp file r_fillnulls_5276
> Locating and isolating NULL areas...
> r.buffer: 00000000 - illegal distance specification

what is the output of "g.region -gm" ??

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.)


- In the script we should temporarily zoom to the raster limits with
g.region first?

- I wonder if we should look at using a bigger r.buffer/r.grow area to
get the slope etc at the edges of the hole a bit more correct?




Hamish


Wed, Feb 23 2005 01:54:56    Status changed to resolved by hbowman  
Wed, Feb 23 2005 01:55:49    Status changed to open by hbowman  
Thu, Feb 24 2005 00:32:30    Mail sent by werchowyna@pf.pl  
Return-Path <werchowyna@pf.pl>
Delivered-To grass-bugs@lists.intevation.de
Message-ID <00d901c51a00$02a6b890$1bd21d3e@eustahiush>
From "Maciek Sieczka" <werchowyna@pf.pl>
To "Hamish" <hamish_nospam@yahoo.com>, "Request Tracker" <grass-bugs@intevation.de>
Cc <grass5@grass.itc.it>
References <20050222223552.AEFA0102C44@lists.intevation.de> <20050223130239.77a787bf.hamish_nospam@yahoo.com>
Subject Re: [GRASS5] [bug #3023] (grass) r.fillnulls doesn't work
Date Thu, 24 Feb 2005 00:31:05 +0100
MIME-Version 1.0
Content-Type text/plain; format=flowed; charset="iso-8859-1"; reply-type=original
Content-Transfer-Encoding 7bit
X-Priority 3
X-MSMail-Priority Normal
X-Mailer Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE Produced By Microsoft MimeOLE V6.00.2900.2180
X-Antivirus avast! (VPS 0507-3, 2005-02-17), Outbound message
X-Antivirus-Status Clean
X-Spam-Status No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
X-Spam-Level
From: "Hamish" <hamish_nospam@yahoo.com>
Subject: Re: [GRASS5] [bug #3023] (grass) r.fillnulls doesn't work


>> this bug's URL: http://intevation.de/rt/webrt?serial_num=3023
>> ---------------------------------------------------------------------
>>
>> Subject: r.fillnulls doesn't work
>
> (works fine for me on 6.0beta2)
>
>
>> GRASS Version: grass-6.0.cvs_src_snapshot_2005_02_12
>>
>> 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.

> at which point in the script? Here it takes a couple minutes to run,
> long part is duing the v.surf.rst step but no runaway memory issues.
> run "top" in another window to watch what is going on?
>
> What is your region set to?
> try 'g.region rast=(map)' first?

I did it of course:

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

Regarding the memory runaway:
- at 20% r.fillnulls starts using swap.
- at 93% the swap is full and mouse hardly responses until done; this is the
longest part.
- it doesn't run that long as I thought - 6 minutes alltogether

My system: RAM 512 MB, SWAP 2.0 GB, plenty of free disk space, Athlon XP 
1.6, Mandrake 10.1, kernel 2.6.8.

>> Several error infos are printed (see below) and finally r.fillnulls
>> fails to produce anything - in spite of claiming to have "Filled
>> raster map is: N51E016_flnull".
>>
>> Details:
>>
>> r.fillnulls input=N51E016 output=N51E016_flnull tension=40. smooth=0.1
>>
>> Using tmp file r_fillnulls_5276
>> Locating and isolating NULL areas...
>> r.buffer: 00000000 - illegal distance specification

> what is the output of "g.region -gm" ??


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

What is yours?

> 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.)

I can't access CVS at home, my expensive, 2kB/s connection doesn't let me 
to. But I'll grab the next CVS snapshot at my Uni.

> - In the script we should temporarily zoom to the raster limits with
> g.region first?

Not really a good idea I guess. Anytime it should be up to the user what 
region he wants to patch.

> - I wonder if we should look at using a bigger r.buffer/r.grow area to
> get the slope etc at the edges of the hole a bit more correct?

Sounds reasonable to me.

On thing more: my bug report was based r.fillnuls in GUI mode. After running
it from the command line I see there are two more errors. Let me quote them 
all now:

1.
invalid map: r_fillnulls_5276.buf
Syntax error

2. (the "new" one)
dbmi: Protocol error (invalid table/column name or unsupported column type)

3. (the second "new" one)
ERROR: Cannot insert new row: insert into vecttmp_fillnulls_4559 values
       (1376152, 208, '')

4.
ERROR: Cannot open old vector vecttmp_fillnulls_4559@PERMANENT on level 2

5.
WARNING: coor files of vector 'vecttmp_fillnulls_4559@PERMANENT' is larger
         than it should be (39908422 bytes excess).
ERROR: You first need to run v.build on vector file
       <vecttmp_fillnulls_4559>

6.
r.patch - rfillnulls_r_fillnulls_4559 not found
WARNING: Table 'vecttmp_fillnulls_4559' linked to vector did not exist.

(BTW: This is badly annoying that the eventuall error information is 
different in GUI and comamnd line.)

After after zooming into a small region...

GRASS 6.0.cvs:~ > g.region -m
n=51.5375
s=51.485
w=16.17833333
e=16.2425
nsres=92.71504003
ewres=57.85284109

...only the error no 1. persists:

invalid map: r_fillnulls_5974.buf
Syntax error

And the r.fillnulls manages to output the filled DEM properly (I guess) in 
spite of it.

Maciek 


Thu, Feb 24 2005 04:36:53    Mail sent by hamish_nospam@yahoo.com  
Return-Path <hamish_nospam@yahoo.com>
Delivered-To grass-bugs@lists.intevation.de
Date Thu, 24 Feb 2005 16:36:34 +1300
From Hamish <hamish_nospam@yahoo.com>
To "Maciek Sieczka" <werchowyna@pf.pl>
Cc grass-bugs@intevation.de, grass5@grass.itc.it
Subject Re: [GRASS5] [bug #3023] (grass) r.fillnulls doesn't work
Message-Id <20050224163634.691fcb98.hamish_nospam@yahoo.com>
In-Reply-To <00d901c51a00$02a6b890$1bd21d3e@eustahiush>
References <20050222223552.AEFA0102C44@lists.intevation.de> <20050223130239.77a787bf.hamish_nospam@yahoo.com> <00d901c51a00$02a6b890$1bd21d3e@eustahiush>
X-Mailer Sylpheed version 1.0.0 (GTK+ 1.2.10; i386-pc-linux-gnu)
X-Face M<EoB)"*Z~u!,vFhXmw}R_KbdBta*P_=T|rbBL'e1/CQ9;/1g\BU3&!=y8ria$2Uk!HT&BB 8i?|X_+7~1jsy}F~g$2va%3fV`*=L(*cem[@3\yg,G,@rg6/QMJ
Mime-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
X-Spam-Status No, hits=-4.0 tagged_above=-999.0 required=3.0 tests=BAYES_00, FORGED_YAHOO_RCVD
X-Spam-Level
> >> this bug's URL: http://intevation.de/rt/webrt?serial_num=3023
> >---------------------------------------------------------------------
> >> > Subject: r.fillnulls doesn't work
> >
..
> >> 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.

...?

> > What is your region set to?
> > try 'g.region rast=(map)' first?
> 
> I did it of course:
> 
> 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.


> > what is the output of "g.region -gm" ??
> 
> 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.)
> 
> I can't access CVS at home, my expensive, 2kB/s connection doesn't let
> me to. But I'll grab the next CVS snapshot at my Uni.

It is possible from CVS snapshot to get just one file:

cd grass6/scripts/r.fillnulls
cvs -z3 update -dP

that will just update the files in that directory (and any
subdirectories), very little bandwidth.

or from the CVS web interface you can grab the files:

http://freegis.org/cgi-bin/viewcvs.cgi/*checkout*/grass6/scripts/r.in.srtm/r.in.srtm?rev=HEAD&conten
t-type=text/plain
http://freegis.org/cgi-bin/viewcvs.cgi/*checkout*/grass6/scripts/r.fillnulls/r.fillnulls?rev=HEAD&co
ntent-type=text/plain
then run "make" from within the modules' directory. (+ install?)

both scripts have new bugfixes and extra checks. can you test them?


> > - In the script we should temporarily zoom to the raster limits with
> > g.region first?
> 
> Not really a good idea I guess. Anytime it should be up to the user
> what region he wants to patch.

ok.


> On thing more: my bug report was based r.fillnuls in GUI mode. After
> running  it from the command line I see there are two more errors. Let
> me quote them  all now:

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



Hamish


Fri, Feb 25 2005 14:52:15    Mail sent by werchowyna@pf.pl  
Return-Path <werchowyna@pf.pl>
Delivered-To grass-bugs@lists.intevation.de
Message-ID <010b01c51b41$43b97920$3bc61d3e@eustahiush>
From "Maciek Sieczka" <werchowyna@pf.pl>
To "Hamish via RT" <grass-bugs@intevation.de>
Cc "Hamish" <hamish_nospam@yahoo.com>, <grass5@grass.itc.it>
References <20050224033653.EFFD5102BFF@lists.intevation.de>
Subject Re: [bug #3023] (grass) r.fillnulls doesn't work
Date Fri, 25 Feb 2005 14:42:29 +0100
MIME-Version 1.0
Content-Type text/plain; format=flowed; charset="iso-8859-2"; reply-type=original
Content-Transfer-Encoding 7bit
X-Priority 3
X-MSMail-Priority Normal
X-Mailer Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE Produced By Microsoft MimeOLE V6.00.2900.2180
X-Antivirus avast! (VPS 0507-3, 2005-02-17), Outbound message
X-Antivirus-Status Clean
X-Spam-Status No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
X-Spam-Level
From: "Hamish via RT" <grass-bugs@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&cont
ent-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 


Sat, Feb 26 2005 06:07:24    Mail sent by hamish_nospam@yahoo.com  
Return-Path <hamish_nospam@yahoo.com>
Delivered-To grass-bugs@lists.intevation.de
Date Sat, 26 Feb 2005 18:07:04 +1300
From Hamish <hamish_nospam@yahoo.com>
To "Maciek Sieczka" <werchowyna@pf.pl>
Cc grass-bugs@intevation.de, grass5@grass.itc.it
Subject Re: [bug #3023] (grass) r.fillnulls doesn't work
Message-Id <20050226180704.6337714b.hamish_nospam@yahoo.com>
In-Reply-To <010b01c51b41$43b97920$3bc61d3e@eustahiush>
References <20050224033653.EFFD5102BFF@lists.intevation.de> <010b01c51b41$43b97920$3bc61d3e@eustahiush>
X-Mailer Sylpheed version 1.0.0 (GTK+ 1.2.10; i386-pc-linux-gnu)
X-Face M<EoB)"*Z~u!,vFhXmw}R_KbdBta*P_=T|rbBL'e1/CQ9;/1g\BU3&!=y8ria$2Uk!HT&BB 8i?|X_+7~1jsy}F~g$2va%3fV`*=L(*cem[@3\yg,G,@rg6/QMJ
Mime-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
X-Spam-Status No, hits=-4.0 tagged_above=-999.0 required=3.0 tests=BAYES_00, FORGED_YAHOO_RCVD
X-Spam-Level
> > 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?

correct. After running 'cvs update' in the module's directory, you can
run 'make' from the same directory to copy the script into the install
dir. Copying by hand as you did works ok too.

 
> 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
..
> ERROR detected: /usr/local/grass-6.0.cvs/scripts/r.fillnulls
> abandoned.  Removing                        temporary map:
..
> > .. pretty much everything will be broken after the r.buffer step
> > fails. Please try again with the two updated scripts.
> 
> As you said...

well at least it fails gracefully now.

hmmm. I've just downloaded the N51E016 SRTM data and r.fillnulls
works fine for me.

Lat/lon location, right?
GRASS> g.proj -p



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 ?



Hamish


Tue, Mar 1 2005 16:58:28    Mail sent by werchowyna@pf.pl  
Return-Path <werchowyna@pf.pl>
Delivered-To grass-bugs@lists.intevation.de
Message-ID <01a001c51e77$9af312d0$43c61d3e@eustahiush>
From "Maciek Sieczka" <werchowyna@pf.pl>
To "Hamish" <hamish_nospam@yahoo.com>
Cc "Hamish via RT" <grass-bugs@intevation.de>, "grass devel" <grass5@grass.itc.it>
References <20050226050724.C9AFF102BF8@lists.intevation.de>
Subject Re: [bug #3023] (grass) r.fillnulls doesn't work
Date Tue, 1 Mar 2005 16:57:10 +0100
MIME-Version 1.0
Content-Type text/plain; format=flowed; charset="iso-8859-2"; reply-type=original
Content-Transfer-Encoding 7bit
X-Priority 3
X-MSMail-Priority Normal
X-Mailer Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE Produced By Microsoft MimeOLE V6.00.2900.2180
X-Antivirus avast! (VPS 0507-3, 2005-02-17), Outbound message
X-Antivirus-Status Clean
X-Spam-Status No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
X-Spam-Level
From: "Hamish via RT" <grass-bugs@intevation.de>

>> 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
> ..
>> ERROR detected: /usr/local/grass-6.0.cvs/scripts/r.fillnulls
>> abandoned.  Removing                        temporary map:
> ..
>> > .. pretty much everything will be broken after the r.buffer step
>> > fails. Please try again with the two updated scripts.
>>
>> As you said...
>
> well at least it fails gracefully now.
>
> hmmm. I've just downloaded the N51E016 SRTM data and r.fillnulls
> works fine for me.
>
> Lat/lon location, right?
> GRASS> g.proj -p

yes:
GRASS 6.0.cvs:~ > g.region -p
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

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

Maciek


Wed, Mar 2 2005 03:24:56    Mail sent by hamish_nospam@yahoo.com  
Return-Path <hamish_nospam@yahoo.com>
Delivered-To grass-bugs@lists.intevation.de
Date Wed, 2 Mar 2005 15:24:39 +1300
From Hamish <hamish_nospam@yahoo.com>
To "Maciek Sieczka" <werchowyna@pf.pl>
Cc grass-bugs@intevation.de, grass5@grass.itc.it
Subject Re: [bug #3023] (grass) r.fillnulls doesn't work
Message-Id <20050302152439.007362f3.hamish_nospam@yahoo.com>
In-Reply-To <01a001c51e77$9af312d0$43c61d3e@eustahiush>
References <20050226050724.C9AFF102BF8@lists.intevation.de> <01a001c51e77$9af312d0$43c61d3e@eustahiush>
X-Mailer Sylpheed version 1.0.0 (GTK+ 1.2.10; i386-pc-linux-gnu)
X-Face M<EoB)"*Z~u!,vFhXmw}R_KbdBta*P_=T|rbBL'e1/CQ9;/1g\BU3&!=y8ria$2Uk!HT&BB 8i?|X_+7~1jsy}F~g$2va%3fV`*=L(*cem[@3\yg,G,@rg6/QMJ
Mime-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
X-Spam-Status No, hits=-4.0 tagged_above=-999.0 required=3.0 tests=BAYES_00, FORGED_YAHOO_RCVD
X-Spam-Level
> >> 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)}'
?


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.



Hamish


Wed, Mar 2 2005 12:06:55    Mail sent by werchowyna@pf.pl  
Return-Path <werchowyna@pf.pl>
Delivered-To grass-bugs@lists.intevation.de
Message-ID <005101c51f18$0c506a40$5bd21d3e@eustahiush>
From "Maciek Sieczka" <werchowyna@pf.pl>
To "Hamish via RT" <grass-bugs@intevation.de>
Cc "Hamish" <hamish_nospam@yahoo.com>
References <20050302022456.BD38B1005AD@lists.intevation.de>
Subject Re: [bug #3023] (grass) r.fillnulls doesn't work
Date Wed, 2 Mar 2005 12:05:41 +0100
MIME-Version 1.0
Content-Type text/plain; format=flowed; charset="iso-8859-2"; reply-type=original
Content-Transfer-Encoding 7bit
X-Priority 3
X-MSMail-Priority Normal
X-Mailer Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE Produced By Microsoft MimeOLE V6.00.2900.2180
X-Antivirus avast! (VPS 0507-3, 2005-02-17), Outbound message
X-Antivirus-Status Clean
X-Spam-Status No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
X-Spam-Level
From: "Hamish via RT" <grass-bugs@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 


Wed, Mar 2 2005 13:12:08    Mail sent by werchowyna@pf.pl  
Return-Path <werchowyna@pf.pl>
Delivered-To grass-bugs@lists.intevation.de
Message-ID <014201c51f21$2910dd00$5bd21d3e@eustahiush>
From "Maciek Sieczka" <werchowyna@pf.pl>
To "Hamish" <hamish_nospam@yahoo.com>
Cc "Hamish via RT" <grass-bugs@intevation.de>, "grass devel" <grass5@grass.itc.it>
Subject Re: [bug #3023] (grass) r.fillnulls doesn't work
Date Wed, 2 Mar 2005 12:50:48 +0100
MIME-Version 1.0
Content-Type text/plain; format=flowed; charset="iso-8859-2"; reply-type=original
Content-Transfer-Encoding 7bit
X-Priority 3
X-MSMail-Priority Normal
X-Mailer Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE Produced By Microsoft MimeOLE V6.00.2900.2180
X-Antivirus avast! (VPS 0507-3, 2005-02-17), Outbound message
X-Antivirus-Status Clean
X-Spam-Status No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
X-Spam-Level
From: "Hamish via RT" <grass-bugs@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


Fri, Mar 4 2005 10:38:24    Mail sent by glynn@gclements.plus.com  
Return-Path <glynn@gclements.plus.com>
Delivered-To grass-bugs@lists.intevation.de
From Glynn Clements <glynn@gclements.plus.com>
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Transfer-Encoding 7bit
Message-ID <16936.11399.111272.678303@gargle.gargle.HOWL>
Date Fri, 4 Mar 2005 09:38:15 +0000
To Hamish <hamish_nospam@yahoo.com>
Cc "Maciek Sieczka" <werchowyna@pf.pl>, grass-bugs@intevation.de, grass5@grass.itc.it
Subject Re: [GRASS5] Re: [bug #3023] (grass) r.fillnulls doesn't work
In-Reply-To <20050302152439.007362f3.hamish_nospam@yahoo.com>
References <20050226050724.C9AFF102BF8@lists.intevation.de> <01a001c51e77$9af312d0$43c61d3e@eustahiush> <20050302152439.007362f3.hamish_nospam@yahoo.com>
X-Mailer VM 7.07 under 21.4 (patch 15) "Security Through Obscurity" XEmacs Lucid
X-Spam-Status No, hits=-4.9 tagged_above=-999.0 required=3.0 tests=BAYES_00
X-Spam-Level
Hamish wrote:

> > >> 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)}'
> ?
> 
> 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.

Hmm. In that case, scripts which use awk should probably have:

	LC_NUMERIC=C
	export LC_NUMERIC

Or just:

	LC_NUMERIC=C awk ...

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


Thu, May 12 2005 15:12:10    Status changed to resolved by msieczka  
Comment | Reply | Take | Open

You are currently authenticated as guest.
[Show Configuration] [Login as another user]

Users Guide - Mail Commands - Homepage of RequestTracker 1.0.7 - list any request