Adam,

The extent of "tmin.mean" suggests longitude/latitude data, not Albers
Equal Area, as your CRS indicates. Either the extent of the CRS is wrong.

According to this specification, the cells of tmin.max cover an area of
about 50 by 50 m (see extent and units of CRS), just N of the bird's head
of Irian Jaya; and as that is outside your "to" raster (that covers
Australia) all values become NA.

Robert

On Tue, Jun 19, 2012 at 4:38 PM, ADAM PETER CARDILINI
<apcar@deakin.edu.au>wrote:

> G'day,
>
> I have been trying to change a raster from one projection, with a high
> resolution, to a new projection, and a lower resolution. When I use
> projectRaster the new object that is produced does not contain any values.
> Am I using projectRaster incorrectly, my rasters and code is below? Any
> help would be really great, thanks in advance.
>
> # My from raster
> tmin.mean
> class       : RasterLayer
> dimensions  : 691, 886, 612226  (nrow, ncol, ncell)
> resolution  : 0.05, 0.05  (x, y)
> extent      : 111.975, 156.275, -44.525, -9.975  (xmin, xmax, ymin, ymax)
> coord. ref. : +proj=aea +lat_1=-18 +lat_2=-36 +lat_0=0 +lon_0=132 +x_0=0
> +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
> values      : in memory
> min value   : 1.003472
> max value   : 27.06694
> layer name  : layer
>
> # My To raster
> a<-raster()
> xmin(a)<- 111.9583
> xmax(a)<- 154.0416
> ymin(a)<- -44.04167
> ymax(a)<- -9.95835
> projection(a)<- "+proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0"
> res(a)<- 1/12
>
> # The code I have used to project the raster
> new.raster<-projectRaster(tmin.mean, a, method= 'bilinear')
>
> # Output raster
> class       : RasterLayer
> dimensions  : 409, 505, 206545  (nrow, ncol, ncell)
> resolution  : 0.08333333, 0.08333333  (x, y)
> extent      : 111.9583, 154.0416, -44.04168, -9.95835  (xmin, xmax, ymin,
> ymax)
> coord. ref. : +proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0
> values      : in memory
> min value   : NA
> max value   : NA
> layer name  : layer
>
> Kind regards,
>
> Adam Cardilini
> PhD Candidate
> Schools of Life and Environmental Sciences,
> Deakin University, 75 Pigdons Rd,
> Waurn Ponds, Vic, Australia, 3217
> Mob: 0431 566 340
> Email: apcar@deakin.edu.au
>
>
>        [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

	[[alternative HTML version deleted]]

