Dear list,
I use TGRASS to calculate a NDVI.
For this I generate two space time raster datasets of the red (b4) and
nir (b8) bands.
When I try to calculate with b4 and b8 I get a Parse Error:
GRASS 7.4.0 (accra32630):~ > t.rast.list input=b4
name|mapset|start_time|end_time
S2_0e76f09b_d221_4e88_b7f9_d3b8aad4975d_20180102T140217_B04_10m|st|2018-01-02
14:02:17|2018-01-02 14:02:18
S2_197fb441_5b8c_48ec_a827_2512f702fd3f_20180114T121946_B04_10m|st|2018-01-14
12:19:46|2018-01-14 12:19:47
GRASS 7.4.0 (accra32630):~ > t.rast.list input=b8
name|mapset|start_time|end_time
S2_0e76f09b_d221_4e88_b7f9_d3b8aad4975d_20180102T140217_B08_10m|st|2018-01-02
14:02:17|2018-01-02 14:02:18
S2_197fb441_5b8c_48ec_a827_2512f702fd3f_20180114T121946_B08_10m|st|2018-01-14
12:19:46|2018-01-14 12:19:47
GRASS 7.4.0 (accra32630):~ > t.rast.mapcalc input=b4,b8 output=test1
expression="test1 = float(b8 + b4)" basename=test1 --overwrite
Starting temporal sampling...
Starting mapcalc computation...
Ungültige Karte
<S2_0e76f09b_d221_4e88_b7f9_d3S2_0e76f09b_d221_4e88_b7f9_d3b8aad4975d_20180102T140217_B08_10maad4975d_20180102T140217_B04_10m>
Parse error
FEHLER: parse error
ERROR: Error while mapcalc computation
What did this error mean and how can I solve it?
I am looking forward to your help.
Thanks and best regards,
Anika
martinl
February 21, 2018, 12:21pm
2
Hi,
2018-02-21 12:57 GMT+01:00 Anika Bettge <bettge@mundialis.de>:
I use TGRASS to calculate a NDVI.
btw, recently I was doing something similar in Jena GRASS GIS workshop, see [1].
GRASS 7.4.0 (accra32630):~ > t.rast.mapcalc input=b4,b8 output=test1
expression="test1 = float(b8 + b4)" basename=test1 --overwrite
Starting temporal sampling...
Starting mapcalc computation...
Ungültige Karte
<S2_0e76f09b_d221_4e88_b7f9_d3S2_0e76f09b_d221_4e88_b7f9_d3b8aad4975d_20180102T140217_B08_10maad4975d_20180102T140217_B04_10m>
Parse error
FEHLER: parse error
ERROR: Error while mapcalc computation
It seems like your input strds are broken. Try to check all maps
registered in input b4 and b8 datasets (by t.rast.list).
t.rast.mapcalc tries to read non-existing raster map
S2_0e76f09b_d221_4e88_b7f9_d3S2_0e76f09b_d221_4e88_b7f9_d3b8aad4975d_20180102T140217_B08_10maad4975d_20180102T140217_B04_10m
in your case.
Ma
[1] http://training.gismentors.eu/grass-gis-workshop-jena-2018/units/21.html#ndvi-st-computation
--
Martin Landa
http://geo.fsv.cvut.cz/gwiki/Landa
http://gismentors.cz/mentors/landa
neteler
February 21, 2018, 1:00pm
3
On Wed, Feb 21, 2018 at 1:21 PM, Martin Landa <landa.martin@gmail.com> wrote:
2018-02-21 12:57 GMT+01:00 Anika Bettge <bettge@mundialis.de>:
I use TGRASS to calculate a NDVI.
btw, recently I was doing something similar in Jena GRASS GIS workshop, see [1].
GRASS 7.4.0 (accra32630):~ > t.rast.mapcalc input=b4,b8 output=test1
expression="test1 = float(b8 + b4)" basename=test1 --overwrite
Starting temporal sampling...
Starting mapcalc computation...
Ungültige Karte
<S2_0e76f09b_d221_4e88_b7f9_d3S2_0e76f09b_d221_4e88_b7f9_d3b8aad4975d_20180102T140217_B08_10maad4975d_20180102T140217_B04_10m>
Parse error
FEHLER: parse error
ERROR: Error while mapcalc computation
It seems like your input strds are broken. Try to check all maps
registered in input b4 and b8 datasets (by t.rast.list).
The full list was printed in Anika's initial email.
t.rast.mapcalc tries to read non-existing raster map
S2_0e76f09b_d221_4e88_b7f9_d3S2_0e76f09b_d221_4e88_b7f9_d3b8aad4975d_20180102T140217_B08_10maad4975d_20180102T140217_B04_10m
in your case.
I think this is a bug.
Vero wrote off-list to me:
"Sometimes, t.rast.mapcalc has issues with names of maps, it seems
it is pasting together the 2 map names instead of using the
basename... "
I found a related ticket by Leo Hardtke:
https://trac.osgeo.org/grass/ticket/2735
[1] http://training.gismentors.eu/grass-gis-workshop-jena-2018/units/21.html#ndvi-st-computation
This we used for inspiration
thanks,
Markus