Details Ticket 1332


Comment | Reply | Open


Serial Number 1332
Subject r.in.gdal: import of arcinfo-asciigrid: northward shift by 1 cellsize
Area bug
Queue grass
Requestors Thomas.Klein@smhi.se
Owner fwarmerdam
Status resolved
Last User Contact Never contacted
Current Priority 30
Final Priority 70
Due No date assigned
Last Action Wed Oct 2 15:12:20 2002 (6 yr ago)
Created Wed Oct 2 14:26:11 2002 (6 yr ago)

Transaction History Ticket 1332


Wed, Oct 2 2002 14:26:11    Request created by guest  
Subject: r.in.gdal: import of arcinfo-asciigrid: northward shift by 1 cellsize
Platform: GNU/Linux/i386
grass obtained from: Trento Italy site
grass binary for platform: Downloaded precompiled Binaries
GRASS Version: GRASS 5.0.0 (August 2002)

Hi!


Import of arcinfo asciigrid data in a lat/lon-location using

r.in.gdal -o in=testdata out=testdata_rast

where the file "testdata" consists of
 
ncols 1 
nrows 1 
xllcenter 0.000000 
yllcenter 0.000000 
cellsize 1.000000 
nodata_value -1.E20 
42.0

yields a raster file with info (obtained from "r.info map=testdata_rast"):

|   Rows:         1                                                         
|   Columns:      1                                                         
|   Total Cells:  1                                                         
|        Projection: Latitude-Longitude (zone 0)                            
|            N:      1:30N    S:      0:30N   Res:     1                    
|            E:      0:30E    W:      0:30W   Res:     1                    
|   Range of data:    min =  42.000000 max = 42.000000                      
Number of rows, cells, longitude-info and range of data are correctly determined.
However, the correct latitude information should instead be 
  N:      0:30N    S:      0:30S   Res:     1
shouldn't it?

The erroneous (?) northward shifting by one cellsize seems to occur even with
more complex arcinfo-asciigrid indata files and for other location types.
Is this an index problem in r.in.gdal for arcinfo-asciigrid data?


Help/comments appreciated, thanks in advance,

Thomas Klein

Wed, Oct 2 2002 15:10:30    Status changed to resolved by fwarmerdam  
Wed, Oct 2 2002 15:12:20    Taken by fwarmerdam  
Wed, Oct 2 2002 15:12:20    Comments added by fwarmerdam  
I agree.  There was a bug in the gdal/frmts/aaigriddataset.cpp file from
GDAL for ascii grid files using xllcenter/yllcenter as opposed to 
xllcorner/yllcorner.  I have committed a fix to GDAL CVS this morning. 
(aaigriddataset.cpp:1.17).  

Please rebuild your libgdal.1.1.so from CVS to get the fix. 

Comment | Reply | 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