[R-sig-Geo] problems with writeGDAL (rgdal)

Agustin Lobo Agustin.Lobo at ija.csic.es
Mon Jul 9 21:54:15 CEST 2007


Hi rsiggeos,

I've found 2 problems with writeGDAL:

If I simply do:

refG25 <- readGDAL("GFOEOAActiv4_25.tif")
writeGDAL(refG25, "delme.tif", drivername = "GTiff", type = "Float32", 
mvFlag = NA, options=NULL)

where GFOEOAActiv4_25.tif is a geotif file,

1. delme.tif has no datum information (I've imported with 2 different 
programs, TNT and Global Mapper), despite the fact that
 > str(refG25)
Loading required package: sp
Formal class 'SpatialGridDataFrame' [package "sp"] with 6 slots
   ..@ data       :'data.frame': 843156 obs. of  1 variable:
   .. ..$ band1: int [1:843156] 0 0 0 0 0 0 0 0 0 0 ...
   ..@ grid       :Formal class 'GridTopology' [package "sp"] with 3 slots
   .. .. ..@ cellcentre.offset: Named num [1:2]  383088 4562588
   .. .. .. ..- attr(*, "names")= chr [1:2] "x" "y"
   .. .. ..@ cellsize         : num [1:2] 25 25
   .. .. ..@ cells.dim        : int [1:2] 1266 666
   ..@ grid.index : int(0)
   ..@ coords     : num [1:2, 1:2]  383088  414713 4562588 4579213
   .. ..- attr(*, "dimnames")=List of 2
   .. .. ..$ : NULL
   .. .. ..$ : chr [1:2] "x" "y"
   ..@ bbox       : num [1:2, 1:2]  383075 4562575  414725 4579225
   .. ..- attr(*, "dimnames")=List of 2
   .. .. ..$ : chr [1:2] "x" "y"
   .. .. ..$ : chr [1:2] "min" "max"
   ..@ proj4string:Formal class 'CRS' [package "sp"] with 1 slots
   .. .. ..@ projargs: chr " +proj=utm +zone=31 +ellps=intl +units=m 
+no_defs"

2. In most cases, the external programs fail reading unless I quit R. It 
seems like rgdal is not releasing the exported file?

Thanks!

Agus



-- 
Dr. Agustin Lobo
Institut de Ciencies de la Terra "Jaume Almera" (CSIC)
LLuis Sole Sabaris s/n
08028 Barcelona
Spain
Tel. 34 934095410
Fax. 34 934110012
email: Agustin.Lobo at ija.csic.es
http://www.ija.csic.es/gt/obster




More information about the R-sig-Geo mailing list