[GRASS-dev] Invalid timestamp file for raster

Veronica Andreo veroandreo at gmail.com
Mon Oct 23 13:54:03 PDT 2017


Hi Nikos,

Have you tried with t.register?

You would need to set the start_time="2013-04-13 10:00:09.935626" plus an
increment="10 seconds". I have not tested, but it should work.

I think it's better than r.timestamp if you want to create time series,
even though it would be great to fix the bug in r.timestamp, anyway.

Cheers,
Vero


El 23 oct. 2017 7:38 p.m., "Nikos Alexandris" <nik at nikosalexandris.net>
escribió:


Nikos:


This
>>
>> r.timestamp B1 date='13 apr 2013 10:00:09.935626' && r.timestamp B1
>> WARNING: Invalid timestamp file for raster map <B1@>
>>
>> does not work. Why?
>>
>
Markus N:


GRASS 7.2.3svn (nc_spm_08_grass7):~ > r.mapcalc "B1 = 2"
> 100%
> GRASS 7.2.3svn (nc_spm_08_grass7):~ >  r.timestamp B1 date='13 apr
> 2013 10:00:09.935626' && r.timestamp B1
> WARNING: Invalid timestamp file for raster map <B1@>
>
> The error message is in lib/gis/timestamp.c, line 301. With debug:
>
>
> GRASS 7.2.3svn (nc_spm_08_grass7):~ >  r.timestamp B1 date='13 apr
> 2013 10:00:09.935626'
> GRASS 7.2.3svn (nc_spm_08_grass7):~ >  r.timestamp B1
> WARNING: Invalid timestamp file for raster map <B1@>
> GRASS 7.2.3svn (nc_spm_08_grass7):~ > g.gisenv set=DEBUG=1
> D1/1: G_set_program_name(): g.gisenv
> GRASS 7.2.3svn (nc_spm_08_grass7):~ >  r.timestamp B1
> D1/1: G_set_program_name(): r.timestamp
> D1/1: G_find_raster(): name=B1 mapset=
> WARNING: Invalid timestamp file for raster map <B1@>
> D1/1: G_set_program_name(): g.gisenv
>

The following do work:
>>
>> r.timestamp B1 date='13 apr 2013 10:00:19.935626' && r.timestamp B1
>> 13 Apr 2013 10:00:19.935626
>>
>
GRASS 7.2.3svn (nc_spm_08_grass7):~ >  r.timestamp B1 date='13 apr
> 2013 10:00:19.935626' && r.timestamp B1
> D1/1: G_set_program_name(): r.timestamp
> D1/1: G_find_raster(): name=B1 mapset=user1
> D1/1: G_set_program_name(): r.timestamp
> D1/1: G_find_raster(): name=B1 mapset=
> 13 Apr 2013 10:00:19.935626
> D1/1: G_set_program_name(): g.gisenv
>
> There is apparently a parsing bug in 10:00:0x  <<-- 0x (while 1x etc work).
> ?
>
>
Obviously.

Here a quick test for 0x:

function seconds { printf "%02d" $1; }
for SEC in `seq 0 1 59` ;do echo $(seconds $SEC) && r.timestamp B1 date="13
apr 2013 10:00:$(seconds $SEC).935626" && r.timestamp B1 ;done

00

WARNING: Invalid timestamp file for raster map <B1@>
01

WARNING: Invalid timestamp file for raster map <B1@>
02

WARNING: Invalid timestamp file for raster map <B1@>
03

WARNING: Invalid timestamp file for raster map <B1@>
04

WARNING: Invalid timestamp file for raster map <B1@>
05

WARNING: Invalid timestamp file for raster map <B1@>
06

WARNING: Invalid timestamp file for raster map <B1@>
07

WARNING: Invalid timestamp file for raster map <B1@>
08

WARNING: Invalid timestamp file for raster map <B1@>
09

WARNING: Invalid timestamp file for raster map <B1@>
10
13 Apr 2013 10:00:10.935626
11
13 Apr 2013 10:00:11.935626
12
13 Apr 2013 10:00:12.935626

[..rest is fine..]

Nikos

_______________________________________________
grass-dev mailing list
grass-dev at lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20171023/f1f142d0/attachment-0001.html>


More information about the grass-dev mailing list