On 30 September 2013 17:10, Johannes Radinger
<johannesradin...@gmail.com> wrote:
> Hi,
>

Hi

> when I tried to write a python script (add-on) for GRASS GIS I experienced
> that there is no overwrite-flag by default in the GUI for that module
> (generate by
> g.parser) which is different from GRASS6x. So is there any possibility to
> create
> that tick-box also in G70?
> Furthermore I am using the grass.script.array to write a raster map from
> a numpy.array:
>
> my_map = garray.array()
> my_map[...] = my_function_mod(input_raster)
> my_map.write(options['my_output'])
>
> But what if the output ("my_output") already exists and I want to overwrite
> that output (e.g. by setting the modules overwrite flag)?
>

overwrite flag should be in the parser, you have to check if overwrite
is active and if your map already exits.
You can check if the overwrite is active with "grass.overwrite()"

> Any suggestions are welcome, thanks!
>
> cheers,
> /Johannes
>

-- 
ciao
Luca

http://gis.cri.fmach.it/delucchi/
www.lucadelu.org
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to