[R-sig-Geo] times and ID records for sp

Edzer J. Pebesma e.pebesma at geo.uu.nl
Wed Apr 19 10:25:44 CEST 2006


Roger Bivand wrote:
> On Wed, 19 Apr 2006, Michael Sumner wrote:
>
>   
>> Hello, I'm trying to figure out the best way to represent time-ordered 
>> records
>> in a SpatialPointsDataFrame.
>>     
>
> Interesting question. I might have chosen rather to create a 
> time_ordered_records object, use the standard SpatialPoints object, and go 
> to a SpatialPointsTOR object, for which the standard SpatialPoints methods 
> should still work. Then the extra logic for validation can be put in place 
> without needing to fit the AttributeList object framework. Another 
> possibility is to stack the IDs on the outside, in a new class of a set of 
> SpatialPointsTOR objects, one object per unique trip, which would make it 
> easier to retrieve by ID - SPDF are by design best at retrieving per 
> location.
>   
... or per attribute characteristics; if say sea elephant SE0031 is the 
id of a
given trip , and the id is called SE in the AttributeList of the SPDF,
you could select its tracked locations from spdf with

spdf[, spdf$SE == "SE0031"]

or using subset().

Bests,
--
Edzer




More information about the R-sig-Geo mailing list