Swagath, have you tried to plot it using plot(), because it looks like the
raster might be wrong. If its fine, you can find an example of using
ggplot2 with raster
http://stackoverflow.com/questions/9940495/plot-raster-factor-values-with-ggplot
.

Etienne


2013/5/3 Swagath Navin <swagathnavin82@gmail.com>

> Hello all,
>
> I am new to rgdal. I downloaded a tif file from 'http://mrdata.usgs.gov/**
> radiometric/data/NArad_U_**geog83.tif<http://mrdata.usgs.gov/radiometric/data/NArad_U_geog83.tif>'
> which i would like to convert into a regular data frame so that i can plot
> it using ggplot2.
>
> when i tried to read the file using readGDAL i get a warning message
>
> NArad_U_geog83.tif has GDAL driver GTiff
> and has 2432 rows and 5868 columns
> Warning message:
> In readGDAL("NArad_U_geog83.tif") : GeoTransform values not available
>
> What does it mean?
>
> Here s the summary of the file:
>
> Object of class SpatialGridDataFrame
> Coordinates:
>   min  max
> x   0 5868
> y   0 2432
> Is projected: NA
> proj4string : [NA]
> Grid attributes:
>   cellcentre.offset cellsize cells.dim
> x               0.5        1      5868
> y               0.5        1      2432
> Data attributes:
>      band1           band2           band3
>  Min.   :  0.0   Min.   :  0.0   Min.   :  0
>  1st Qu.:255.0   1st Qu.:255.0   1st Qu.:255
>  Median :255.0   Median :255.0   Median :255
>  Mean   :222.4   Mean   :231.1   Mean   :226
>  3rd Qu.:255.0   3rd Qu.:255.0   3rd Qu.:255
>  Max.   :255.0   Max.   :255.0   Max.   :255
>
> Can anyone please tell me which packages i should look into for converting
> it into a data frame so that i can plot it using ggplot2.
>
> Thanks,
> Swagath
>
> ______________________________**_________________
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/**listinfo/r-sig-geo<https://stat.ethz.ch/mailman/listinfo/r-sig-geo>
>

	[[alternative HTML version deleted]]

