Details Ticket 4897


Comment | Reply | Resolve


Serial Number 4897
Subject r.in.gdal: FCELL is forced on output
Area grass6
Queue grass
Requestors tutey@o2.pl
Owner fwarmerdam
Status open
Last User Contact Mon Jul 24 14:48:56 2006 (2 yr ago)
Current Priority 30
Final Priority 70
Due No date assigned
Last Action Mon Jul 24 15:24:46 2006 (2 yr ago)
Created Mon Jul 24 13:36:36 2006 (2 yr ago)

Transaction History Ticket 4897


Mon, Jul 24 2006 13:36:36    Request created by guest  
Subject: r.in.gdal, AAIGrid: FCELL is forced on output

Platform: GNU/Linux/x86
grass obtained from: CVS
grass binary for platform: Compiled from Sources
GRASS Version: 2006.07.23

If the input AAIGrid raster is double floating point, r.in.gdal will import it
as a trunctated FCELL anyway.

to reproduce:

create a DCELL map, eg.:
r.mapcalc 'map=double(rand(100.0,1000.0))'

export and import it back:
r.out.gdal input=map format=AAIGrid type=Float32 output=map.arc
r.in.gdal input=/home/shoofi/map.arc output=map_gdal 

see the difference (ie. data corruption):
r.mapcalc 'diff=map-map_gdal'
r.info -r diff
min=-0.000031
max=0.000031



Note that the integer/floating point detection for AAIGrid driver in GDAL was
fixed after 1.3.2 release, so we could consider disposing r.out/in.arc in Grass
7 *if* r.in.gdal is fixed to support DCELL for AAIGrid (r.in.arc allows enforcing
DCELL output, maybe r.in.gdal should follow?).

Maciek
Mon, Jul 24 2006 14:48:18    Mail sent by msieczka  
> If the input AAIGrid raster is double floating point, r.in.gdal will import
> it as a trunctated FCELL anyway.

UPDATE:

This problem is not limited to AAIGrid! Eg. GeoTiff is affected to. This is a
serious issue! What r.out.gdal exports should be identical to what r.in.gdal
imports, but it's not.

Maciek
Mon, Jul 24 2006 14:48:56    Mail sent by msieczka  
> If the input AAIGrid raster is double floating point, r.in.gdal will import
> it as a trunctated FCELL anyway.

UPDATE:

This problem is not limited to AAIGrid! Eg. GeoTiff is affected to. This is a
serious issue! What r.out.gdal exports should be identical to what r.in.gdal
imports back, but it's not.

Maciek
Mon, Jul 24 2006 14:50:05    Subject changed to r.in.gdal: FCELL is forced on output by msieczka  
Mon, Jul 24 2006 15:12:41    Comments added by guest  
I have confirmed that r.in.gdal imports double precision (Float64) data
as FCELL_TYPE instead of DCELL_TYPE.  I'm not sure why this was done. 

I'll look into fixing this, though it might not be wise to put this into
6.1 final. 
Mon, Jul 24 2006 15:24:46    Taken by fwarmerdam  
Mon, Jul 24 2006 15:24:46    Comments added by fwarmerdam  
Sorry, the last was me.
Comment | Reply | 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