Note: A new GRASS GIS stable version has been released: GRASS GIS 7.8. Go directly to the new manual page here
Bases: object
Example how to use MetaModule
>>> g = MetaModule('g')
>>> g_list = g.list
>>> g_list.name
'g.list'
>>> g_list.required
['type']
>>> g_list.inputs.type = 'raster'
>>> g_list.inputs.mapset = 'PERMANENT'
>>> g_list.stdout_ = -1
>>> g_list.run()
Module('g.list')
>>> g_list.outputs.stdout
u'...basin...elevation...'
>>> r = MetaModule('r')
>>> what = r.what
>>> what.description
'Queries raster maps on their category values and category labels.'
>>> what.inputs.map = 'elevation'
>>> what.inputs.coordinates = [640000,220500]
>>> what.run()
>>> v = MetaModule('v')
>>> v.import
File "<doctest grass.pygrass.modules.shortcuts.MetaModule[16]>", line 1
v.import
^
SyntaxError: invalid syntax
>>> v.import_
Module('v.import')
File "<doctest grass.pygrass.modules.shortcuts.MetaModule[16]>", line 1
v.import
^
SyntaxError: invalid syntax
Note: A new GRASS GIS stable version has been released: GRASS GIS 7.8. Go directly to the new manual page here
Help Index | Topics Index | Keywords Index | Full Index
© 2003-2020 GRASS Development Team, GRASS GIS 7.6.2dev Reference Manual