Nikos Alexandris wrote:
> > how can I use the 'from' parameter in a python script? The following > ``` > from_range=0,255 > to_range=0,511 > cls.runModule('r.rescale', input=band, output=output_map_name, > from=from_range, to=to_range, overwrite=True) > ``` > > causes expectedly > ``` > SyntaxError: invalid syntax > ```
Vaclav Petras a écrit :
Try `from_`. I'm not sure at this point if it works in a gunittest (which you seem to be using). Vaclav
Nikos:
I already tried that and it does not work. Yes, trying to build tests for the "new" i.rgb.his. Thank you, Nikos
Note to self: `r.rescale` works fine without the `from` parameter. The actual minimum and the maximum values, of the `input` map are always used. Thinking about: what would be a use case where the `from` values would need to be user defined, which implies they would need to differ from the map's actual minimum and maximum? If I didn't miss anything, `grep` finds only 1 use of `r.rescale` within a script. It is the addon `grass7/raster/r.mblend/r.mblend.py`, in line 270. Nikos
signature.asc
Description: PGP signature
_______________________________________________ grass-dev mailing list grass-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-dev