Hi 

Using a combination of the scripts provided here (by Babak N.): 
http://r-gis.net/?q=ModisDownload and the MODIS reproject tool, I've finally 
managed to download NDVI data for North America and project it to the same 
geographic coordinate system as PRISM precip. data (e.g. 
http://www.prism.oregonstate.edu) for the same time period. 

I now want to stack these two rasters. My NDVI layer has a greater extent than 
the PRISM layer so I crop the former by the latter using:

croppedNDVI<-crop(NDVI,prism)


But when I look at the resulting raster, I see that the extent still doesn't 
line up. I think this is an issue with cells of the two rasters being "off" 
centre from each other. I can use the following to get them to align:

adjustNDVI<-resample(croppedNDVI,prism)


Now I can stack the "adjustNDVI" and "prism" layers as the extents match. But I 
am wondering whether this is valid? Why were the initial rasters misaligned in 
the first place given that I specified the same resolution and geographic 
coordinate system/datum when I processed the MODIS file? I'm grateful for any 
clarification!
        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to