[GRASS-dev] granularity function
Sören Gebbert
soerengebbert at googlemail.com
Wed May 17 01:08:04 PDT 2017
Hi Luca,
2017-05-17 9:36 GMT+02:00 Luca Delucchi <lucadeluge at gmail.com>:
> Hi devs, Soeren
>
> I'm looking for a function that return the number of minutes, days,
> months, years according the granularity, for example "2 months" should
> return 60 days and "1 years" could return 12 months or 365 days.
> does it exist a function like that or could I add it to
> lib/python/temporal/temporal_granularity.py ?
I am not sure if i understand your approach correctly.
IMHO you would like to return the calendar hierarchy of a specific granularity?
For example, if the granularity of a STDS is calculated to be 2 month,
you would like to return 60 days?
This may not be possible, since the number of days in a month vary for
each month,
as well as the number of days in a year. Hence the result of a
granularity computation
can not be splittet to a smaller calendar hierarchy, since the term
month and year is abstract and not related to a specific year (leap or
not) or a specific month (28 - 31 day range).
Does this answer your question?
Ciao
Sören
>
> --
> ciao
> Luca
>
> www.lucadelu.org
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-dev
More information about the grass-dev
mailing list