[R-sig-Geo] Reversed raster after readGDAL()

2010-02-10 Thread Agustin Lobo
Hi! After r3 - readGDAL(test2.tif) test2.tif has GDAL driver GTiff and has 256 rows and 256 columns image(r3,col=rainbow(128)) I get the image N-S reversed. I've put an screenshot and the actual geotif image here: http://sites.google.com/site/eospansite/dummy/test2_screenshot2.jpeg

Re: [R-sig-Geo] Reversed raster after readGDAL()

2010-02-10 Thread Roger Bivand
On Wed, 10 Feb 2010, Agustin Lobo wrote: Hi! After r3 - readGDAL(test2.tif) test2.tif has GDAL driver GTiff and has 256 rows and 256 columns image(r3,col=rainbow(128)) I get the image N-S reversed. I've put an screenshot and the actual geotif image here:

Re: [R-sig-Geo] Reversed raster after readGDAL()

2010-02-10 Thread Agustin Lobo
Thanks Sarah. But I think that package sp has an specific method of image() for objects SpatialGridDataFrame, which is the class returned by readGDAL(), and this specific method takes care of this problem. Check image.SpatialGridDataFrame in package {sp} Agus 2010/2/10 Sarah Goslee

Re: [R-sig-Geo] Reversed raster after readGDAL()

2010-02-10 Thread Paul Hiemstra
Hi, What if you make an spplot, still the same problem? cheers, Paul Agustin Lobo wrote: Thanks Sarah. But I think that package sp has an specific method of image() for objects SpatialGridDataFrame, which is the class returned by readGDAL(), and this specific method takes care of this

Re: [R-sig-Geo] Reversed raster after readGDAL()

2010-02-10 Thread Agustin Lobo
Yes, same problem Agus 2010/2/10 Paul Hiemstra p.hiems...@geo.uu.nl: Hi, What if you make an spplot, still the same problem? cheers, Paul Agustin Lobo wrote: Thanks Sarah. But I think that package sp has an specific method of image() for objects SpatialGridDataFrame, which is the class

Re: [R-sig-Geo] Reversed raster after readGDAL()

2010-02-10 Thread Roger Bivand
On Wed, 10 Feb 2010, Agustin Lobo wrote: I think I tripped on this same stone, but cannot find anything in my records, perhaps it's on the lost computer. Sorry, can't find such a posting - maybe my search keys were wrong - you could try the nabble archive. The file test2.tif was made by

Re: [R-sig-Geo] Reversed raster after readGDAL()

2010-02-10 Thread Agustin Lobo
I forward to qgis devel and Marco Hugentobler. I really cannot understand, Qgis uses gdal for writing and reading geotif files as far as I know. I think the point is that QGIS reports the origin in the NW corner and then uses negative resolution for Y. But do not understand the discrepancy in the