[GRASS-dev] No "overwrite" option in grass 7 addon scripts?

Isaac Ullah isaac.ullah at asu.edu
Thu Feb 26 08:56:19 PST 2015


Thank you Anna and Markus. The help is very much appreciated! I will read
the linked documentation, and I will review Anna's proposed changes to
r.viewshed.cva and merge them.

May I also suggest that the documentation of the use of "new" for output
files be added to the example code in the g.parser man page (
http://grass.osgeo.org/grass70/manuals/g.parser.html)? That would make it a
lot easier to find for new script writers...

Cheers,

~Isaac

On Thu, Feb 26, 2015 at 7:49 AM, Markus Neteler <neteler at osgeo.org> wrote:

> On Thu, Feb 26, 2015 at 1:53 AM, Anna Petrášová <kratochanna at gmail.com>
> wrote:
> > On Wed, Feb 25, 2015 at 4:49 PM, Isaac Ullah <isaac.ullah at asu.edu>
> wrote:
> >>
> >> Hi all, sorry for the spat of messages today, but as you can tell, I'm
> >> having trouble getting my addon scripts up to par for GRASS7 standard.
> I'm
> >> trying to figure these issues out on my own, but I can't seem to find
> any
> >> documentation that can help me do so. My current issue is that I'm
> noticing
> >> that my python scripts are lacking the automatically generated flag for
> >> --overwrite in the GUI. One can add --overwrite to the command line
> (and it
> >> works fine), but it's not there in the GUI.
> ...
> > You should be using standardized option G_OPT_R_INPUT, the definition
> can be
> > found here:
> >
> http://grass.osgeo.org/programming7/parser__standard__options_8c_source.html
> >
> > The key here is to specify 'new' in gisprompt, but only for output map.
> > 'new' means that a new map will be created and parser then knows that it
> > should check whether there is already a map of such name and if yes,
> require
> > overwrite. Based on 'new', the overwrite flag is created.
>
> I have added that here:
> http://grasswiki.osgeo.org/wiki/Module_command_line_parser#Troubleshooting
>
> Thanks for reporting (and the solution of course!)
>
> Markus
>



-- 
Isaac I Ullah, Ph.D.

Arizona State University
School of Human Evolution and Social Change
PO Box 2402
Tempe, AZ 85287-2402
(480) 727-1054 office
(650) 201-0479 cell
iullah at asu.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20150226/4d946e70/attachment.html>


More information about the grass-dev mailing list