[GRASS-dev] Invalid timestamp file for raster

Nikos Alexandris nik at nikosalexandris.net
Mon Oct 23 10:38:32 PDT 2017


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20171023/723f5500/attachment-0001.sig>


More information about the grass-dev mailing list