

Dear List members
I am trying to ready time series of monthly weather data to
R which are in ascii grid format (480). I used some of the previous comments in
mailing list and able to read those files. 

 
library (raster)
library (proj4)

## Create a list
Data <- list.files()

## Stack them
weather <- stack (lapply(Data,raster))

All the ascii data were in lat and long. However, spatial reference
for those files are not assign and I used following command to assign spatial
reference

# Projection
projection(weather) <- "+proj=longlat +ellps=WGS84
+datum=WGS84 +no_defs"
 
Now I need to pre-project them to local coordinate system

+proj=utm +zone=55
+south +ellps=WGS84 +datum=WGS84 +units=m +no_defs
 
And used following command
ptransform(data = weather, src.proj = "+proj=longlat
+ellps=WGS84 +datum=WGS84 +no_defs", dst.proj = "+proj=utm +zone=55
+south +ellps=WGS84 +datum=WGS84 +units=m +no_defs")
 
But it gives error. 
#Error in ptransform(data = weather, src.proj = "+proj=longlat +ellps=WGS84 #+datum=WGS84 +no_defs",  : 
 # input must be 2-dimensional with at most three columns
 
So, can anyone advice me how to do re-projection for stacked
raster. And also will it be possible to change to resolution from 5 * 5 km grids
to 90 * 90 m grids for projected rasters stack (after re-projection). 

Thanks
Cheers,
Senani
	[[alternative HTML version deleted]]

