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?
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
r.timestamp B1 date='13 apr 2013 10:00:29.935626' && r.timestamp B1
13 Apr 2013 10:00:29.935626
r.timestamp B1 date='13 apr 2013 10:00:39.935626' && r.timestamp B1
13 Apr 2013 10:00:39.935626
r.timestamp B1 date='13 apr 2013 10:00:49.935626' && r.timestamp B1
13 Apr 2013 10:00:49.935626
r.timestamp B1 date='13 apr 2013 10:00:59.935626' && r.timestamp B1
13 Apr 2013 10:00:59.935626
Nikos
On Mon, Oct 23, 2017 at 6:41 PM, Nikos Alexandris
<nik@nikosalexandris.net> wrote:
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?
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).
?
Markus
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
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@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@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev
JFYI:
The temporal framework (used in t.register) ignores fractions of a
second. The smallest temporal granule is a second. Hence, it doesn't
make sense to use time-stamps for maps with fractions of a second in
the temporal framework.
Best regards
Sören
2017-10-23 22:54 GMT+02:00 Veronica Andreo <veroandreo@gmail.com>:
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@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@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev
Danke Soeren, Vero
Just trying to retain the original meta, in this case for Landsat8
imagery.
Nikos
* Sören Gebbert <soerengebbert@googlemail.com> [2017-10-23 23:08:12 +0200]:
JFYI:
The temporal framework (used in t.register) ignores fractions of a
second. The smallest temporal granule is a second. Hence, it doesn't
make sense to use time-stamps for maps with fractions of a second in
the temporal framework.
Best regards
Sören
* Veronica Andreo <veroandreo@gmail.com> [2017-10-23 22:54:03 +0200]:
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.
I am r.timestamp-ing Landsat bands while importing them via a script and
sourcing meta from MTL files. I noticed that in some cases, the time
stamping did not work.
Cheers, Nikos
Hi Nikos, thanks Sören 
You can also use t.register for only one map if you want (t.register maps=single_map start=“2003-04-13 10:00:09”). In that way you timestamp them as you import.
Then you create the strds (t.create) and pass the list of already timestamped maps (t.register input=your_strds maps=list_of_maps).
Cheers,
Vero
···
El 24 oct. 2017 12:59 a.m., “Nikos Alexandris” <nik@nikosalexandris.net> escribió:
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.
I am r.timestamp-ing Landsat bands while importing them via a script and
sourcing meta from MTL files. I noticed that in some cases, the time
stamping did not work.
Cheers, Nikos
Hi Nikos,
the strategy that i use is to create an input file for t.register that
contains the raster names and the time stamps for registration:
map_name | start_time | end_time
...
...
In case of Landsat scenes, there are not end-time stamps. Create this
file while importing and fill it with map names and time stamps.
Use this file with t.register and register all maps in a STRDS that
have been imported. I would suggest to create a single STRDS for each
band, so you can use map algebra for computation.
Best regards
Sören
2017-10-24 0:59 GMT+02:00 Nikos Alexandris <nik@nikosalexandris.net>:
* Veronica Andreo <veroandreo@gmail.com> [2017-10-23 22:54:03 +0200]:
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.
I am r.timestamp-ing Landsat bands while importing them via a script and
sourcing meta from MTL files. I noticed that in some cases, the time
stamping did not work.
Cheers, Nikos
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev
Hallo Soeren,
I think I well understand the magic behind TGIS by now.
I am doing exactly as you explain: while importing Landsat imagery, the
script (of which I am not pleased as it is now, no tests yet :-/)
- gets the MTL file
(https://github.com/NikosAlexandris/i.landsat.import/blob/master/i.landsat.import.py#L332)
- gets the timestamp
(https://github.com/NikosAlexandris/i.landsat.import/blob/master/i.landsat.import.py#L424)
- prints it on-screen as TGIS expects
(https://github.com/NikosAlexandris/i.landsat.import/blob/master/i.landsat.import.py#L539)
yet, exports in a file if requested
(https://github.com/NikosAlexandris/i.landsat.import/blob/master/i.landsat.import.py#L542
and
https://github.com/NikosAlexandris/i.landsat.import/blob/master/i.landsat.import.py#L782)
I am doing my job for the moment. Yet the timestamping part needs a complete rewrite.
I note, however, your tip to create a single STRDS for each band.
Thank for the magic,
Nikos
ps- Apologies for not finding the time to keep up with filing tickets in
trac, documenting stuff in our Wiki and be more participative.
* Sören Gebbert <soerengebbert@googlemail.com> [2017-10-24 12:56:43 +0200]:
Hi Nikos,
the strategy that i use is to create an input file for t.register that
contains the raster names and the time stamps for registration:
map_name | start_time | end_time
...
In case of Landsat scenes, there are not end-time stamps. Create this
file while importing and fill it with map names and time stamps.
Use this file with t.register and register all maps in a STRDS that
have been imported. I would suggest to create a single STRDS for each
band, so you can use map algebra for computation.
Best regards
Sören
2017-10-24 0:59 GMT+02:00 Nikos Alexandris <nik@nikosalexandris.net>:
* Veronica Andreo <veroandreo@gmail.com> [2017-10-23 22:54:03 +0200]:
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.
I am r.timestamp-ing Landsat bands while importing them via a script and
sourcing meta from MTL files. I noticed that in some cases, the time
stamping did not work.
Cheers, Nikos
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev
--
Nikos Alexandris | Remote Sensing & Geomatics
GPG Key Fingerprint 6F9D4506F3CA28380974D31A9053534B693C4FB3