Skip to content

rgdal not correctly reading world file?

3 messages · Roger Bivand, Agustin Lobo

#
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
or
the image is not rotated. Does this imply
that rgdal is ignoring the second and third
entries in the world file (thus assuming 0)?

(I've aslo done:
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: alobolistas.vcf
Type: text/x-vcard
Size: 251 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20090620/5ca58255/attachment.vcf>
#
On Sat, 20 Jun 2009, Agustin Lobo wrote:

            
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 see, sounds complicated. And not sure this would be of general interest.

I've been able to solve the problem
using gdaltransform through system().
Using the world files and not actually
rewriting the rotated images to disk saves
a lot of disk and time, I'm processing hundreds
of UAV images. Just adding the correct
tfw file is the best solution for an initial
positioning.

Thanks

Agus
Roger Bivand wrote:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: alobolistas.vcf
Type: text/x-vcard
Size: 251 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20090620/3661e3f9/attachment.vcf>