[GRASS-user] function doesn't work anymore

Moritz Lennert mlennert at club.worldonline.be
Tue Jul 14 23:52:42 PDT 2015


On 14/07/15 16:41, Gra wrote:
> Hi this function
>
> Hi this function:
>
> def normalize (inras,outras):
>
> min = grass.raster_info(inras)['min']
>
> max = grass.raster_info(inras)['max']
>
> grass.mapcalc("$outras = float(($inras -$valuem) / ($valueM-$valuem))",
> inras = inras, outras = outras, valuem = min,valueM = max, overwrite=True)
>
> grass.run_command('g.remove', flags='f', type='raster', name=inras,
> quiet=True)
>
>
>
> doesn't work anymore
>
> apparently the syntax changed for min = grass.raster_info(inras)['min']

Could you give us more details: version of GRASS GIS, error message, etc ?

Moritz


More information about the grass-user mailing list