sftime icon indicating copy to clipboard operation
sftime copied to clipboard

sftime

Open edzer opened this issue 6 years ago • 4 comments

@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.

edzer avatar Oct 01 '19 10:10 edzer

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):

  • As I understood, we are now mainly looking for a 'modern' alternative for what used to be the STIDF class in spacetime, since stars is already suitable for the STFDF and STSDF classes, and trajectories handles the STTDF class?
  • This includes finding ways to represent both time instances and (open and closed) time intervals.
  • And - on the long term - implementing temporal predicates (https://www.mdpi.com/data/data-04-00086/article_deploy/html/images/data-04-00086-g001.png), similar to the spatial predicate functions in sf?

luukvdmeer avatar Oct 02 '19 08:10 luukvdmeer

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.

edzer avatar Oct 02 '19 16:10 edzer

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!

bniebuhr avatar Nov 24 '20 15:11 bniebuhr

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

edzer avatar Nov 24 '20 15:11 edzer