Looks like you missed one { before of Red. Don't know...maybe isn't it bur
give a try.Maxi Il 01/Lug/2016 06:15, "Vinay Elothunkal" <[email protected]> ha scritto: > Hi all, > > Can anyone please help me to solve the error with '@' mark which comes > along with mapset in python GRASS script. I get the following error when > I run "mapcal.py" > > *syntax error, unexpected '@', expecting '('* > > # mapcal.py > import grass.script as g > lis=['a@mapset','b@mapset'] > for i in lis: > > > g.mapcalc("{tmp_NDVI}=float({NIR}-Red})/float({NIR}+{Red})".format(tmp_NDVI='NDVI'+str(i), > NIR='B5@mapset',Red='B4@mapset'),overwrite=True) > > > Thanks, > > _______________________________________________ > grass-user mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/grass-user >
_______________________________________________ grass-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-user
