[R-sig-Geo] extracting time series data from a raster brick of AVHRR satellite data

janverbesselt janverbesselt at gmail.com
Wed Jul 27 14:25:12 CEST 2011


I have done the following:

1. read a small subset of the modis image time series (2000-2011, i.e. 262
images) in and save as a raster stack.
2. below read in the .grd file as a brick with 262 layers and dim = 17,13
containing integer values
3. now I am trying to extract time series per pixel for further processing,
this however is very slow.
It takes more than 30sec for one time series. I have tried modis[row,col]
but this is not faster.

Any advice? Should I do this via Python or can this be done via R but more
efficient?


> ## read in Brick
> modis <- brick("modis.grd")
> nlayers(modis)
[1] 262
> dim(modis)
[1]  17  13 262
> 
> (system.time(test <- extract(modis,1)))
   user  system elapsed 
 35.985   0.084  36.194 
> (system.time(test <- modis[1,1]))
   user  system elapsed 
 35.847   0.076  36.051 



--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/extracting-time-series-data-from-a-raster-brick-of-AVHRR-satellite-data-tp6622055p6625919.html
Sent from the R-sig-geo mailing list archive at Nabble.com.



More information about the R-sig-Geo mailing list