[GRASS-dev] [GRASS GIS] #2346: r.timestamp: support also YYYY-DOY

#2346: r.timestamp: support also YYYY-DOY
-------------------------------------+--------------------------------------
Reporter: neteler | Owner: grass-dev@…
     Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.0
Component: LibGIS | Version: svn-releasebranch70
Keywords: r.timestamp, t.register | Platform: All
      Cpu: Unspecified |
-------------------------------------+--------------------------------------
It would be of great help (esp. for time series) to add
year/doy (Day Of Year) support to r.timestamp. From this
t.register would benefit as well.

The "only" change needed seems to be an upgrade of G_scan_timestamp():

http://grass.osgeo.org/programming7/scan_8c_source.html#l00043

probably by adding a new function scan_doy() //Day Of Year

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2346&gt;
GRASS GIS <http://grass.osgeo.org>

#2346: r.timestamp: support also YYYY-DOY
----------------------------------------------------+-----------------------
Reporter: neteler | Owner: grass-dev@…
     Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.0
Component: LibGIS | Version: svn-releasebranch70
Keywords: r.timestamp, t.register, temporal, doy | Platform: All
      Cpu: Unspecified |
----------------------------------------------------+-----------------------
Changes (by wenzeslaus):

  * keywords: r.timestamp, t.register => r.timestamp, t.register,
               temporal, doy

Comment:

If doing this, try to follow some consistent terminology/naming.

I've recently encountered different namings in GRASS: DOY, Day of Year,
day of year, doy, daynum and day.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2346#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#2346: r.timestamp: support also YYYY-DOY
----------------------------------------------------+-----------------------
Reporter: neteler | Owner: grass-dev@…
     Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.0
Component: LibGIS | Version: svn-releasebranch70
Keywords: r.timestamp, t.register, temporal, doy | Platform: All
      Cpu: Unspecified |
----------------------------------------------------+-----------------------

Comment(by huhabla):

This must be implemented in the C datetime library and in the temporal
framework parser in datetime_math.py[1]. I hoped that the dateutils[2]
already support this to have it out of the box, but unfortunately they
don't.

Hence we should orient on the ISO 8601 standard for ordinal dates when
implementing this (YYYY-DDD) but not YYYYDDD, since the temporal framework
and the C datetime library also support relative time and can't decide if
1900031 is 31. Jan. 1900 or if it is the number of seconds, days, ... .

[1]
http://grass.osgeo.org/programming7/datetime__math_8py_source.html#l00704
[2] https://labix.org/python-dateutil

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2346#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>