[GRASS-dev] Re: [bug #3889] (grass) r.in.arc: fails on r.out.gdal output

Maciej Sieczka tutey at o2.pl
Mon Aug 14 10:43:12 EDT 2006


Markus Neteler napisa?(a):

> would you mind to post this to the list? I don't
> know how to fix the nan problem. Hopefully Glynn
> or someone else picks it up.

Here it goes. Bug http://intevation.de/rt/webrt?serial_num=3889:

mneteler wrote (Sun, Aug 13 2006 23:45:49):

> can you send me a small example file on which r.in.arc fails
> via personal mail?

Markus,

There is no need to. In Spearfish:

$ g.region rast=slope -ap
$ r.out.gdal input=slope at PERMANENT format=AAIGrid type=Float32
output=slope.arc
$ r.in.arc input=slope.arc output=slope_back type=FCELL

r.in.arc: ** errors detected in header section **

  illegal "nodata_value" value in header
    nodata_value: nan
CREATING SUPPORT FILES FOR slope_back

$ r.info -r slope_back
min=nan
max=nan
     ^
     |
    OOPS!


Currently r.in.gdal doesn't bahave like I described in my post of Fri,
Dec 9 2005 21:01:34, but it does the same what r.in.arc does:

$ r.in.gdal input=slope.arc output=slope_back_gdal
$ r.info -r slope_back_gdal
min=nan
max=nan

If you display either back-imported raster, you'll be able to query it
and valid values will be returned. Only you can't see anything, and when
you query at the borders you get the reason of troubles:

slope_back_gdal in sieczka  , quant   (Null)
slope_back_gdal in sieczka  , actual  (nan)

NOTE !!!: The r.in.arc output seems more corrupted than r.in.gdal's,
please try this:

$ g.region n=4924440 s=4921260 e=603390 w=598860 -p
$ r.mapcalc 'diff=slope-slope_back'
$ d.rast diff

There are null cells randomly distributed instead of all equal 0; I
don't know why they are here. r.in.gdal output (slope_back_gdal)
substracted from slope seems OK - returns only 0s like it should.

Maciek




More information about the grass-dev mailing list