[R-sig-Geo] plotKML tutorials for creating a times series from rasters?

Tomislav Hengl hengl at spatial-analyst.net
Wed Oct 3 09:14:23 CEST 2012


On 03/10/2012 00:17, nikos ves wrote:
> An update :
>
> After some experiments, I have created a rasterbrick with 55 layers.
> ( By stitching 55 geotif's into a vrt using gdal [$gdalbuildvrt
> -separate -o tmp.vrt *.tif])
>
> mBrick = brick("/path/to/vrt")
>
>
>
> Afterwards when I was trying to create the ts
>   the the following command
>
> package(lubridate)
>
>   dates_mBrink_end =  dates_mBrink + months(1)
>
> mBrick_ts <- new("RasterBrickTimeSeries",variable = "mVariable",rasters
> = mBrick,TimeSpan.begin = dates_mBrick, TimeSpan.end=(dates_mBrick_end
> +months(1)))
>
> it gives me this error:
>
> "Error in validObject(.Object) :
>    invalid class “RasterBrickTimeSeries” object: Length of the
> 'TimeSpan.begin' and 'TimeSpan.end' slots and the total number of
> rasters do not match"

You are missing sample points (1 or more) and it seems that the 
'ncol(mBrick at rasters@data at values)' is NOT = 55. The validity check for 
the "RasterBrickTimeSeries" class is explained at: 
[https://r-forge.r-project.org/scm/viewvc.php/pkg/R/AAA-classes.R?view=markup&root=plotkml]

Please also compare your output with my outputs in this tutorial: 
[http://plotkml.r-forge.r-project.org/tutorial.php#RasterBrickTimeSeries]

Again, I am sorry to tell you this but I still do not (yet) have a 
solution for handling large data via plotKML. Maybe by the end of 2012 
this should be possible via FWTools and tiling scripts.

also note that plotKML is still experimental package with about 10% 
functionality missing and numerous bugs and sub-optimalities (working on 
it :)

HTH

T. Hengl

>
> Obviously because  of the error, I checked and the layers, dates_mBrink
> and dates_mBrink_lenght are equal to (55).
>
>
> Anyone who can give me any pointers on what I am missing here? Is it
> because im using a vrt as input?
>
>
>
> Kind Regards,
>
> Nick Ves
>
> On Tue, 2012-10-02 at 22:21 +0300, nikos ves wrote:
>> Hi list,
>>
>>
>> I was browsing the list and I found out about plotKML. It seems a nice
>> way to present your data, or do a visual inspection.
>>
>>
>> I tried to create a timeseries visualization from an environmental index
>> Im studying at the moment (55 geotiffs ~35 MB each) but I couldn't
>> figure out how.
>>
>> Anyone can give me some pointers on how to proceed? Maybe some notes,
>> articles that he/she found somewhere and want to share the knowledge? (A
>> google search didn't turn anything except from the manuals :/)
>>
>>
>> Thank you all in advance!
>>
>> Nikos Ves
>>
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>



More information about the R-sig-Geo mailing list