[R-sig-Geo] displayDataset command
Roger.Bivand at nhh.no
Tue May 20 16:38:06 CEST 2008
On Tue, 20 May 2008, Monica Pisica wrote:
> I am trying to display a geotiff using displayDataset command from rgdal
> ..... which i can do pretty successfully but i cannot display axes for
> my map .... i tried to use axes = TRUE and i got the error that axes is
> matched by multiple arguments and if i try to set xaxs and yaxs as equal
> to "i" or "r" they are simply ignored .....
> Suppose my geotiff is named d1 ...
> x <- GDAL.open(d1)
> displayDataset(x, zlim = c(-2, 5.7), col = rainbow(20), xaxs = "r", yaxs
> = "r")
> And i get a nice image display but no axes what so ever ;-)
If you look in the code, you'll see that axes are set to FALSE internally,
and the drawing units are manipulated, so the graphics display does not
know where they should go or which units they should be in. Since you can
use output.dim= in readGDAL too, I'd go with
image(readGDAL(d1), col=grey.colors(20), axes=TRUE)
adding arguments to readGDAL() to decimate the image if there are many
pixels. You don't get the color palette, though, but it could be retrieved
if need be.
> I will really appreciate any help you can provide,
> E-mail for the greater good. Join the im Initiative from Microsoft.
> [[alternative HTML version deleted]]
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