Details Ticket 3889


Comment | Reply | Take | Resolve


Serial Number 3889
Subject r.in.arc: fails on r.out.gdal output
Area grass6
Queue grass
Requestors tutey@o2.pl
Owner none
Status open
Last User Contact Mon Aug 14 12:51:17 2006 (2 yr ago)
Current Priority 30
Final Priority 70
Due No date assigned
Last Action Mon Aug 14 12:51:17 2006 (2 yr ago)
Created Fri Dec 9 20:55:37 2005 (3 yr ago)

Transaction History Ticket 3889


Fri, Dec 9 2005 20:55:37    Request created by guest  
Subject: r.in.arc: fails on r.out.gdal output

Platform: GNU/Linux/i386
grass obtained from: CVS
grass binary for platform: Compiled from Sources
GRASS Version: 6.1 2005-11-16

r.in.arc is not able to handle ArcInfo ASCII grids produced by r.out.gdal. They
have 'NODATA_value    nan' about which r.in.arc says:

r.in.arc input=dem_5.arc output=dem_5.arc_arc type=FCELL mult=1.0 
r.in.arc: ** errors detected in header section **

  illegal "nodata_value" value in header
    nodata_value: na

However, the import proceeds, yet the resulting raster is strange:

GRASS 6.1.cvs (poloniny_65):~ > r.info -r dem_5.arc_arc
min=nan
max=nan

This means it is impossible to assign it a colortable and on d.rast nothing is
displayed. Yet d.what.rast says there are cells with valid, expected values.
Either r.out.gdal should be prevented from using 'nan' for 'no data' when exporting
to AAIGrid, or r.in.arc should be fixed to handle such grids.

Which approach would be correct?

Maciek
Fri, Dec 9 2005 21:01:34    Mail sent by guest  
I forgot one thing:

There is also something wrong when I use r.in.gdal to import AAIGrid exported
by r.out.gdal - 'no value' cells are set to 0 instead of null in the resulting
Grass raster.

Maciek
Wed, Jul 26 2006 18:10:30    User changed to tutey@o2.pl by msieczka  
Sun, Aug 13 2006 23:45:49    Mail sent by mneteler  
Maciek,

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

Markus
Mon, Aug 14 2006 12:51:17    Mail sent by msieczka  
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@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
Comment | Reply | Take | Resolve

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