[GRASS-user] 6.4 vs 7.0

Paolo Craveri pcraveri at gmail.com
Sat Jan 16 09:58:59 EST 2010


Hi to all.

I have some scripts which perfectly work in GRASS 6.4 whereas in GRASS
7.0 they give  problems.
Here some examples:

r.mapcalc 'grid1=rand(1,10)' #works in GRASS 6.4;
## in 7.0 I need:
r.mapcalc expr='grid1=rand(1,10)' –overwrite

echo "UPDATE polyNoTopology \
SET label='poly$a' WHERE cat=$index" | db.execute ##works in GRASS
6.4; in 7.0 I need:
echo "UPDATE polyNoTopology \
SET label='poly$a' WHERE cat=$index" | db.execute in=-

echo "5,3" | v.in.ascii out=point fs="," cat=0 --o # works perfectly
in 6.4 but not in 7.0
## in 7.0 I have to create a file (perhaps, is there a better way?)
echo "5,3">coord
v.in.ascii input=coord out=point fs="," cat=0 --o

Is there a rule of thumb for  this... new syntax ? (e.g. “no pipe at all”?)
Do I have to test version (g.version) in all my (bash) scripts ?
Is there a workaround, perhaps any tips and tricks,  to avoid modify
all my scripts in order to work in 6.4 **and** in 7.0 ?
(ok: perhaps python scripting should be a solution; I'm trying...)


Thanks

-- 
Paolo


More information about the grass-user mailing list