[GRASS-user] v.mapcalc

Enrico Gabrielli bonushenricus bonushenricus76 at gmail.com
Sun Mar 14 01:07:52 PST 2021


Hi
How are you?
After solving thanks to Stefan and his r.slope.direction how to
calculate the slope along the keyline, now I have to solve how to
create parallels to the keyline. Nothing easier: see parallel! But I
have to create many. In the graphical modeler I can't learn how to use
the loop. Damn if I'm ignorant. But maybe v.mapcalc would also be very
handy. But it doesn't work for me. After installing ply it doesn't work
anyway.
> Traceback (most recent call last):
>   File "/usr/lib/grass76/scripts/v.mapcalc", line 429, in
> <module>
>     sys.exit(main())
>   File "/usr/lib/grass76/scripts/v.mapcalc", line 415, in
> main
>     p.parse(expression)
>   File "/usr/lib/grass76/scripts/v.mapcalc", line 191, in
> parse
>     self.parser.parse(expression)
>   File "/usr/lib/python2.7/dist-packages/ply/yacc.py", line
> 333, in parse
>     return self.parseopt_notrack(input, lexer, debug,
> tracking, tokenfunc)
>   File "/usr/lib/python2.7/dist-packages/ply/yacc.py", line
> 1063, in parseopt_notrack
>     lookahead = get_token()     # Get the next token
>   File "/usr/lib/python2.7/dist-packages/ply/lex.py", line
> 393, in token
>     newtok = self.lexerrorf(tok)
>   File "/usr/lib/grass76/scripts/v.mapcalc", line 146, in
> t_error
>     (t.lineno, t.value))
> SyntaxError: syntax error on line 1 near
> ''buff_l(keyline at PERMANENT,5)''
I used all possible quotes in the expression, but the result is always
the same

I don't want to use qgis (where there would be offset) because
r.slope.direction is in grass and it is very convenient, and also all
the rasters I use have them in grass. I would like to learn how to do
everything in GRASS.
Well, who knows if I'll succeed. As soon as I have some pennies I pay a
friend of mine who is a python developer: maybe it's better.

Thanks
-- 
Perito agrario Enrico Gabrielli
Tessera n. 633 Collegio Periti agrari prov. Di Modena
Biblioteca agricoltura: https://www.zotero.org/groups/aplomb/
https://it.linkedin.com/pub/enrico-gabrielli/9a/186/159
https://enricogabrielli76.wordpress.com/
https://www.inaturalist.org/observations/bonushenricus
skype: enricogabrielli (enricogabrielli76.peragr at gmail.com)



More information about the grass-user mailing list