[R-sig-Geo] space - time SpatialPixels dataframe

Edzer Pebesma edzer.pebesma at uni-muenster.de
Tue Sep 27 13:55:35 CEST 2011



On 09/27/2011 10:35 AM, Peter van Horssen wrote:
> Hi all,
>
> I have an irregular (space-time) dataset with counts per 'gridcell'
>
>  > data2.pts.sum[1:10,]
> coordinates datum sum
> 1 (-9375, 480625) 2010-11-29 1
> 2 (5375, 530375) 2011-01-28 1
> 3 (21875, 529375) 2010-11-29 1
> 4 (25625, 396875) 2010-02-10 1
> 5 (26375, 396875) 2010-02-10 9
> 6 (26625, 418125) 2011-05-12 1
> 7 (28125, 419875) 2006-02-16 1
> 8 (28375, 524125) 2011-01-28 1
> 9 (28875, 418375) 2005-02-10 3
> 10 (29375, 409125) 2010-04-22 5
>
> What I like to end up with is a _full grid_ STFDF.
>
> I have created a spatialpixelsdataframe and then applying
> fullgrid(spdf)<-TRUE but this creates, obviously, 'NAS' in dates and data.
>
> The question is how to proceed.
> Creating (manually) a file with all spatial locations and all dates
> (19257 x 75) and
> then matching data to it ? Or is there a smarter solution?
> (e.g is it somehow possible to use fullgrid on a STIDF/STFDF? )

Hi Peter,

right now, ST* classes do not have a fullgrid method, but I will think 
about it. Anyway, they would be another way of coercion, as in

as(x, "STFDF")

which is how the vignette tells you how to do it.

For constructing STFDF objects, you can use constructor functions 
STIDF(), STSDF() and STFDF(), or alternatively stConstruct(); all have 
documentation, and examples in the vignette.

Bests,

>
>
> greetings Peter
>
> --
> ================================
> Peter van Horssen
> Bureau Waardenburg bv
> Adviseurs voor ecologie&  milieu
> Postbus 365
> 4100 AJ Culemborg
> Tel: 0345-512710
> Fax: 0345-519849
> e-mail:p.w.van.horssen at buwa.nl
> ================================
>
> ---------------------------- DISCLAIMER --------------------------
> De informatie verzonden met dit e-mail bericht is uitsluitend bestemd voor de geadresseerde. Openbaarmaking, vermenigvuldiging, verspreiding en/of verstrekking aan derden is niet toegestaan. Gebruik van deze informatie door anderen dan de geadresseerde is verboden. U wordt verzocht bij onjuiste adressering de afzender direct te informeren door het bericht te retourneren.
>
> P  denk aan het milieu voordat u dit bericht print
>

-- 
Edzer Pebesma
Institute for Geoinformatics (ifgi), University of Münster
Weseler Straße 253, 48151 Münster, Germany. Phone: +49 251
8333081, Fax: +49 251 8339763  http://ifgi.uni-muenster.de
http://www.52north.org/geostatistics      e.pebesma at wwu.de



More information about the R-sig-Geo mailing list