I am trying to plot a very large timeseries charts associated with 
RasterBrickTimeSeries-class in plotKML. The idea is to divide the 
RasterBrickTimeSeries into regions, and to use snowfall multicore as well.A 
reproducible example is below:library(plotKML)
library(raster)
library(sp)
library(snowfall)
data(LST)
#create a sample point for each cell
pnts <- LST[,47:48] # lon and lat columns
pnts <- cbind(1:nrow(pnts), pnts)
coordinates(pnts) <- ~lon + lat
proj4string(pnts) <- CRS("+proj=longlat +datum=WGS84")

gridded(LST) <- ~lon+lat
proj4string(LST) <- CRS("+proj=longlat +datum=WGS84")
## get the dates from the file names:
dates <- sapply(strsplit(names(LST), "LST"), function(x){x[[2]]})
datesf <- format(as.Date(dates, "%Y_%m_%d"), "%Y-%m-%dT%H:%M:%SZ")
## begin / end dates +/- 4 days:
TimeSpan.begin = as.POSIXct(unclass(as.POSIXct(datesf))-4*24*60*60, 
origin="1970-01-01") 
TimeSpan.end = as.POSIXct(unclass(as.POSIXct(datesf))+4*24*60*60, 
origin="1970-01-01")

LST_ll <- brick(LST[1:5])
LST_ll@title = "Land Surface Temperature images"
LST.ts <- new("RasterBrickTimeSeries", variable = "LST", sampled = pnts, 
              rasters = LST_ll, TimeSpan.begin = TimeSpan.begin[1:5], 
              TimeSpan.end = TimeSpan.end[1:5])
data(SAGA_pal)
## plot images in Google Earth:
plotKML(LST.ts, colour_scale=SAGA_pal[[1]])Till here the code is fine, a chart 
is plotted for each pointTrying the kml.tiles on pnts works:tiles.LST.ts <- 
kml.tiles(pnts, block.x=0.05, size=0.4)Tiles are produced and work fine, but of 
course it plots only the point locations not the actual charts.I am not much 
interested in plotting the raster themselves, rather the timeseries charts 
only. Hence, plotKML.GDALobj might not be the best optionIs there a way to use 
kml.tiles on the LST.ts (i.e. RasterBrickTimeSeries) to plot the timeseries 
charts in parallels and 
regions?
Best, Amit
p.s. I asked this question onĀ gis.stackexchange, but didn't get answers yet. I 
though, I might have better chances here! 

  
|  
|   
|   
|   |    |

   |

  |
|  
|   |  
plotKML RasterBrickTimeSeries (timeseries charts) in parallel and regions
 I am trying to plot a very large timeseries charts associated with 
RasterBrickTimeSeries-class in plotKML. The i...  |   |

  |

  |

 
 
        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to