[GRASS-SVN] r73773 - grass-addons/grass7/vector/v.out.png
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Dec 6 02:55:19 PST 2018
Author: neteler
Date: 2018-12-06 02:55:19 -0800 (Thu, 06 Dec 2018)
New Revision: 73773
Modified:
grass-addons/grass7/vector/v.out.png/v.out.png.py
Log:
v.out.png addon: fix world file support which requires display region settings and not grass.region()
Modified: grass-addons/grass7/vector/v.out.png/v.out.png.py
===================================================================
--- grass-addons/grass7/vector/v.out.png/v.out.png.py 2018-12-06 04:25:01 UTC (rev 73772)
+++ grass-addons/grass7/vector/v.out.png/v.out.png.py 2018-12-06 10:55:19 UTC (rev 73773)
@@ -58,6 +58,7 @@
import os
import sys
from grass.script import core as grass
+from grass.script import utils as grassutils
from grass.script import gisenv
from grass.pygrass.modules.shortcuts import display as d
from grass.pygrass.modules.shortcuts import general as g
@@ -85,9 +86,10 @@
if monitor_old:
g.gisenv(set='MONITOR=%s' % monitor_old)
- # get computational region info
- win = grass.region()
-
+ # get display region info
+ s = grass.read_command('d.info', flags='g')
+ win = grassutils.parse_key_val(s, val_type=float)
+
if flags['w']:
wldfile = options['output'].split('.')[0] + '.wld'
file_ = open(wldfile, "w")
More information about the grass-commit
mailing list