Skip to content

Try to write GeoTiff with rgdal

4 messages · Lydia Gerharz, Agustin Lobo, Edzer Pebesma +1 more

#
Hi,

I have problems with writeGDAL. With:

 >writeGDAL(mean2005, "mean.tif", drivername="GTiff", options="TFW=YES")

I export a SpatialGridDataFrame with 9 bands to a GeoTiff. But when I 
try to display this GeoTiff in ArcGIS, all 9 bands are not correctly 
displayed and all cells have the same value (1.17549e-038). I also tried 
another GIS (PcRaster) but it doesn't work. Can somebody tell me what I 
did wrong? In R all 9 bands are displayed correctly.

Thank you very much,
Lydia
#
Many programs are not able to display tiff files with more
than 3 bands. Test with qgis 0.10 or globalmapper. Or with matlab

Agus
Lydia Gerharz wrote:

  
    
#
Also, I believe that ArcGIS assumes GeoTIFF are integer always, whereas 
yours (I know) are floating point.

You may want to use gdalinfo on it, which is probably in fwtools. Or, 
yes, qgis.
--
Edzer

Agustin Lobo wrsote:
#
On Fri, 23 May 2008, Agustin Lobo wrote:

            
Any other program using GDAL (like QGIS) will read files written by GDAL. 
ArcGIS is an exception, as it predictably does the wrong thing. My 
experience is that you have to read GeoTiff through the toolbox raster 
calculate statistics module, because ArcGIS guesses wrong about how the 
data are configured, and often ignores valid NA cells (hence the odd 
values). A three-band will typically be interpreted by ArcGIS as an RGB 
image. Doing it a band at a time, and going in through the toolbox (think 
Python script) is feasible. On the other hand, non-GDAL ENVI handles 
GDAL-written multiband GeoTiffs without any trouble that I've seen.

Welcome to the world of "interoperability"!

Roger