r-spatial / sftime

time extension to sf objects
https://r-spatial.github.io/sftime/
Apache License 2.0
49 stars 5 forks source link

sftime #1

Open edzer opened 5 years ago

edzer commented 5 years ago

@luukvdmeer following up on our workshop during the OpenGeoHub summer school, I started a fresh repo for sf time objects. It's pretty empty still; for initial support we can think of methods for package gstat (all *ST functions; @bengraeler) and for st_join methods with stars objects; see also https://github.com/appelmar/gdalcubes_R/issues/26 for sampling a data cube along a trajectory.

luukvdmeer commented 5 years ago

Great! For me mainly the st_join method with stars objects looks very interesting and fits nice into the work I am doing on data cubes now in Salzburg. I would like to work on that as a start!

Just to make clear what your view on the scope of the package is (I know this is just a start and it might change over time):

edzer commented 5 years ago

Yes; leaving trajectories on the side, for now, this is for time-stamped features.

Currently, time is a time stamp only; for Date one could interpret this as a "full day" (left-close, right-open), for POSIXct it is really a time instance IMO. If we want to represent time intervals, we need a class for this, I would take a list column with length two POSIXct values representing a single left-closed right-open interval: [from, to), nothing else. stars already has the ability to represent time as intervals. One could go all the way and allow a non-negative even number of values, indicating 0 or more intervals (0 for the missing interval).

Starting with st_join would be good, ignoring intervals in sftime objects first.

bniebuhr commented 3 years ago

Hi,

I've just found about this sftrack package: https://mablab.org/sftrack/ You may probably know, but I guess some parallels may be good!

edzer commented 3 years ago

Thanks for reminding! Yes, coercion methods from and to sftrack seem to be trivial and useful.