[R-sig-Geo] rgdal not correctly reading world file?
Roger Bivand
Roger.Bivand at nhh.no
Sat Jun 20 12:26:34 CEST 2009
On Sat, 20 Jun 2009, Agustin Lobo wrote:
> Hi!
>
> I have a tif file along with a tifw file, the
> last one stating a rotation. If I display the
> tif file with a gis (i.e., qgis), the image
> is correctly displayed with its rotation,
> but if I use
>> r <- raster("SDIM0413_L1.TIF")
>> image(r)
> or
>> x <- GDAL.open("SDIM0413_L1.TIF")
>> displayDataset(x, band=1)
>
> the image is not rotated. Does this imply
> that rgdal is ignoring the second and third
> entries in the world file (thus assuming 0)?
The underlying assumption is no rotation, so it is discarded. A new class
would be needed for holding the data, and for display the rotated raster
cells would have to be constructed as polygons, not the unrotated
rectangles expected by image() or levelplot().
Roger
>
> (I've aslo done:
>> r <- readGDAL("SDIM0413_L1.TIF")
> SDIM0413_L1.TIF has GDAL driver GTiff
> and has 1760 rows and 2640 columns
>
> but, as r is large, cannot use image(r) )
>
> Thanks
>
> Agus
>
--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no
More information about the R-sig-Geo
mailing list