[GRASS-user] use pi number

Glynn Clements glynn at gclements.plus.com
Sat Aug 23 04:54:00 EDT 2008


José María Michia wrote:

> r.mapcalc 'prueba = pi()'
> r.mapcalc 'prueba = pi'
> r.mapcalc 'prueba = PI()'
> r.mapcalc 'prueba = PI'
> 
> With the following results:
> 
> Syntax error
> 
> Is this normal? Is IP defined within GRASS / r.mapcalc?

r.mapcalc doesn't have a definition for pi; you'll need to enter a
literal value.

Note that all of r.mapcalc's trigonometric functions accept or return
angles measured in degrees, so you don't need to explicitly multiply
or divide by pi/180.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-user mailing list