2010/2/10 António Rocha <antonio.ro...@deimos.com.pt>:
> Hey All
>
> Both suggestions worked. Thanks
> By the way, I'm having some difficulties in using mapcalc in a python
> scripts.
> I'm doing this
> grass.mapcalc(options['output']=options['raster1']+options['raster2'])
>
> And I get:
>  File "/usr/local/grass-6.4.0svn/scripts/python.teste",
> line 61
>   grass.mapcalc(options['output']=options['raster1']+options['raster2'])
> SyntaxError: keyword can't be an expression
>
> How can I use an option as an input in mapcalc funtion, called from a Python
> script?

In grass7/scripts/r.plane/r.plane.py I see

    grass.mapcalc("$name = $type($round(x() * $kx + y() * $ky + $kz))",
                  name = name, type = type, round = round, kx = kx, ky
= ky, kz = kz)

Perhaps a way how to do it.

Markus
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to