[R-sig-Geo] Efficient way to process a time series of MODIS image

Loïc Dutrieux loic.dutrieux at conabio.gob.mx
Thu Jan 19 11:24:14 CET 2017


Good question, it's rarely necessary, or a good idea, to convert rasters
to dataframes/data.tables for analysis. For pixel wise operations use
raster::calc() or simple raster arithmetics, which inherits from vector
arithmetics.

Cheers,
Loïc

On 19/01/2017 09:35, Zhang Tianyi wrote:
> Dear all,
> 
> 
> I am working with MODIS data (MOD09A1) with R. I now have a rasterstack data with each layer for each MODIS image.
> 
> I found I need to extract time series for each cell to do a set of regular manuplation. I have some possible solutions:
> 
> (1) change the values of rasterstack to data.table and row-wisely process this data.table variable by apply()
> 
> (2) work on rasterstack itself, and do vectorized programming
> 
> 
> I think the second one will be better, but I am not sure because the method 1 is using data.table.
> 
> I am wondering what is the most efficient way to do that when you are processing remote sensing data with R?
> 
> Thank you very much
> 
> 
> Tianyi Zhang
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> 
> Email secured by Check Point
>



More information about the R-sig-Geo mailing list