[GRASS-dev] [GRASS GIS] #3852: PyGRASS GridModule silently ignores when module has no output defined
GRASS GIS
trac at osgeo.org
Fri May 24 05:35:24 PDT 2019
#3852: PyGRASS GridModule silently ignores when module has no output defined
-------------------------+-------------------------
Reporter: martinl | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.6.2
Component: PyGRASS | Version: unspecified
Keywords: GridModule | CPU: Unspecified
Platform: Unspecified |
-------------------------+-------------------------
For modules like G7:r.mapcalc PyGRASS !GridModule class fails to work. No
output is patched since the module has no output option defined.
{{{
from grass.pygrass.modules import Module
from grass.pygrass.modules.grid import GridModule
from grass.pygrass.utils import findmaps
from grass.pygrass.gis import Mapset
Module('g.region', n=1000, s=0, e=1000, w=0, res=1)
grd = GridModule('r.mapcalc',
width=250, height=250, overlap=0,
processes=4, split=False,
expression='out = 1')
grd.run()
print (findmaps('raster', 'out', mapset=str(Mapset())))
}}}
Prints
{{{
100%
100%
100%
100%
100%
100%
100%
100%
100%
100%
100%
100%
100%
100%
100%
100%
[]
}}}
-> no raster map created. The !GridModule should fail at least when no
output option is defined.
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3852>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list