[GRASS-SVN] r63656 - in grass/trunk: gui/wxpython/iscatt gui/wxpython/lmgr gui/wxpython/rdigit gui/wxpython/vnet lib/python/pygrass/raster/testsuite lib/python/pygrass/tests lib/python/script scripts/d.rast.edit scripts/r.in.wms scripts/v.out.gps temporal/t.rast.out.vtk
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Dec 20 12:33:31 PST 2014
Author: neteler
Date: 2014-12-20 12:33:31 -0800 (Sat, 20 Dec 2014)
New Revision: 63656
Modified:
grass/trunk/gui/wxpython/iscatt/iscatt_core.py
grass/trunk/gui/wxpython/lmgr/datacatalog.py
grass/trunk/gui/wxpython/rdigit/controller.py
grass/trunk/gui/wxpython/vnet/vnet_core.py
grass/trunk/lib/python/pygrass/raster/testsuite/test_raster.py
grass/trunk/lib/python/pygrass/tests/set_mapset.py
grass/trunk/lib/python/script/db.py
grass/trunk/scripts/d.rast.edit/d.rast.edit.py
grass/trunk/scripts/r.in.wms/wms_base.py
grass/trunk/scripts/v.out.gps/v.out.gps.py
grass/trunk/temporal/t.rast.out.vtk/t.rast.out.vtk.py
Log:
update g.copy calls to use new element names (#2409)
Modified: grass/trunk/gui/wxpython/iscatt/iscatt_core.py
===================================================================
--- grass/trunk/gui/wxpython/iscatt/iscatt_core.py 2014-12-20 20:21:46 UTC (rev 63655)
+++ grass/trunk/gui/wxpython/iscatt/iscatt_core.py 2014-12-20 20:33:31 UTC (rev 63656)
@@ -197,7 +197,7 @@
return 1
return RunCommand("g.copy",
- rast=cat_rast + ',' + rast_name,
+ raster=cat_rast + ',' + rast_name,
getErrorMsg=True,
overwrite=True)
Modified: grass/trunk/gui/wxpython/lmgr/datacatalog.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/datacatalog.py 2014-12-20 20:21:46 UTC (rev 63655)
+++ grass/trunk/gui/wxpython/lmgr/datacatalog.py 2014-12-20 20:33:31 UTC (rev 63656)
@@ -388,13 +388,13 @@
label = _("Copying") + " " + string + " ..."
self.showNotification.emit(message=label)
if (self.GetItemText(self.copy_type)=='vector'):
- pasted = RunCommand('g.copy', vect=string)
+ pasted = RunCommand('g.copy', vector=string)
node = 'vector'
elif (self.GetItemText(self.copy_type)=='raster'):
- pasted = RunCommand('g.copy', rast=string)
+ pasted = RunCommand('g.copy', raster=string)
node = 'raster'
else:
- pasted = RunCommand('g.copy', rast3d=string)
+ pasted = RunCommand('g.copy', raster_3d=string)
node = 'raster_3d'
if pasted == 0:
if self.selected_type == None:
Modified: grass/trunk/gui/wxpython/rdigit/controller.py
===================================================================
--- grass/trunk/gui/wxpython/rdigit/controller.py 2014-12-20 20:21:46 UTC (rev 63655)
+++ grass/trunk/gui/wxpython/rdigit/controller.py 2014-12-20 20:33:31 UTC (rev 63656)
@@ -406,7 +406,7 @@
name = name.split('@')[0]
backup = name + '_backupcopy_' + str(os.getpid())
try:
- gcore.run_command('g.copy', rast=[name, backup], quiet=True)
+ gcore.run_command('g.copy', raster=[name, backup], quiet=True)
except CalledModuleError:
raise ScriptError
Modified: grass/trunk/gui/wxpython/vnet/vnet_core.py
===================================================================
--- grass/trunk/gui/wxpython/vnet/vnet_core.py 2014-12-20 20:21:46 UTC (rev 63655)
+++ grass/trunk/gui/wxpython/vnet/vnet_core.py 2014-12-20 20:33:31 UTC (rev 63656)
@@ -348,7 +348,7 @@
RunCommand("g.copy",
overwrite = True,
- vect = [self.results["vect_map"].GetVectMapName(), mapName])
+ vector = [self.results["vect_map"].GetVectMapName(), mapName])
if len(self.giface.GetLayerList().GetLayersByName(mapName)) == 0:
# TODO: get rid of insert
@@ -429,14 +429,14 @@
mapName, mapSet = ParseMapStr(self.tmpTurnAn.GetVectMapName())
cmdCopy = [
"g.copy",
- "vect=%s,%s" % (params["input"], mapName),
+ "vector=%s,%s" % (params["input"], mapName),
"--overwrite",
]
cmdParams.append("input=" + self.tmpTurnAn.GetVectMapName())
ret, msg, err = RunCommand('g.copy',
getErrorMsg = True,
- vect = "%s,%s" % (params['input'], mapName),
+ vector = "%s,%s" % (params['input'], mapName),
read = True,
overwrite = True)
@@ -514,14 +514,14 @@
mapName, mapSet = ParseMapStr(self.tmpTurnAn.GetVectMapName())
cmdCopy = [
"g.copy",
- "vect=%s,%s" % (params['input'], mapName),
+ "vector=%s,%s" % (params['input'], mapName),
"--overwrite",
]
cmdParams.append("input=" + self.tmpTurnAn.GetVectMapName())
ret, msg, err = RunCommand('g.copy',
getErrorMsg = True,
- vect = "%s,%s" % (params['input'], mapName),
+ vector = "%s,%s" % (params['input'], mapName),
read = True,
overwrite = True)
Modified: grass/trunk/lib/python/pygrass/raster/testsuite/test_raster.py
===================================================================
--- grass/trunk/lib/python/pygrass/raster/testsuite/test_raster.py 2014-12-20 20:21:46 UTC (rev 63655)
+++ grass/trunk/lib/python/pygrass/raster/testsuite/test_raster.py 2014-12-20 20:33:31 UTC (rev 63656)
@@ -15,7 +15,7 @@
cls.name = 'elevation'
cls.tmp = 'tmp' + cls.name
- g.copy(rast=[cls.name, cls.tmp], overwrite=True)
+ g.copy(raster=[cls.name, cls.tmp], overwrite=True)
@classmethod
def tearDownClass(cls):
Modified: grass/trunk/lib/python/pygrass/tests/set_mapset.py
===================================================================
--- grass/trunk/lib/python/pygrass/tests/set_mapset.py 2014-12-20 20:21:46 UTC (rev 63655)
+++ grass/trunk/lib/python/pygrass/tests/set_mapset.py 2014-12-20 20:33:31 UTC (rev 63656)
@@ -60,7 +60,7 @@
grasscore.run_command('db.login', user=opts.user)
print("\n\nCopy the map from PERMANENT to user1...\n")
grasscore.run_command('g.copy',
- vect="boundary_municp at PERMANENT,boundary_municp_pg",
+ vector="boundary_municp at PERMANENT,boundary_municp_pg",
overwrite=True)
print("\n\nBuild topology...\n")
grasscore.run_command('v.build', map='boundary_municp_pg', overwrite=True)
@@ -75,10 +75,10 @@
database=os.path.join(db))
print("\n\nCopy the map from PERMANENT to user1...\n")
grasscore.run_command('g.copy',
- vect="boundary_municp at PERMANENT,boundary_municp_sqlite",
+ vector="boundary_municp at PERMANENT,boundary_municp_sqlite",
overwrite=True)
print("\n\nBuild topology...\n")
grasscore.run_command('v.build', map='boundary_municp_sqlite', overwrite=True)
if __name__ == "__main__":
- main()
\ No newline at end of file
+ main()
Modified: grass/trunk/lib/python/script/db.py
===================================================================
--- grass/trunk/lib/python/script/db.py 2014-12-20 20:21:46 UTC (rev 63655)
+++ grass/trunk/lib/python/script/db.py 2014-12-20 20:33:31 UTC (rev 63656)
@@ -28,7 +28,7 @@
"""Return the list of columns for a database table
(interface to `db.describe -c`). Example:
- >>> run_command('g.copy', vect='firestations,myfirestations')
+ >>> run_command('g.copy', vector='firestations,myfirestations')
0
>>> db_describe('myfirestations') # doctest: +ELLIPSIS
{'nrows': 71, 'cols': [['cat', 'INTEGER', '20'], ... 'ncols': 22}
@@ -68,7 +68,7 @@
If no driver or database are given, then default settings is used
(check db_connection()).
- >>> run_command('g.copy', vect='firestations,myfirestations')
+ >>> run_command('g.copy', vector='firestations,myfirestations')
0
>>> db_table_exist('myfirestations')
True
@@ -121,7 +121,7 @@
Examples:
- >>> run_command('g.copy', vect='firestations,myfirestations')
+ >>> run_command('g.copy', vector='firestations,myfirestations')
0
>>> db_select(sql = 'SELECT cat,CITY FROM myfirestations WHERE cat < 4')
(('1', 'Morrisville'), ('2', 'Morrisville'), ('3', 'Apex'))
@@ -171,7 +171,7 @@
"""Return the name of vector connected to the table.
It returns None if no vectors are connected to the table.
- >>> run_command('g.copy', vect='firestations,myfirestations')
+ >>> run_command('g.copy', vector='firestations,myfirestations')
0
>>> db_table_in_vector('myfirestations')
['myfirestations at user1']
Modified: grass/trunk/scripts/d.rast.edit/d.rast.edit.py
===================================================================
--- grass/trunk/scripts/d.rast.edit/d.rast.edit.py 2014-12-20 20:21:46 UTC (rev 63655)
+++ grass/trunk/scripts/d.rast.edit/d.rast.edit.py 2014-12-20 20:33:31 UTC (rev 63656)
@@ -490,7 +490,7 @@
atexit.register(self.cleanup)
- run('g.copy', rast = (self.inmap, self.outmap), overwrite = True)
+ run('g.copy', raster = (self.inmap, self.outmap), overwrite = True)
run('r.colors', map = self.outmap, rast = self.inmap)
def cleanup(self):
Modified: grass/trunk/scripts/r.in.wms/wms_base.py
===================================================================
--- grass/trunk/scripts/r.in.wms/wms_base.py 2014-12-20 20:21:46 UTC (rev 63655)
+++ grass/trunk/scripts/r.in.wms/wms_base.py 2014-12-20 20:33:31 UTC (rev 63656)
@@ -452,7 +452,7 @@
try:
mask_copy = self.opt_output + self.original_mask_suffix
grass.run_command('g.copy', quiet=True,
- rast=mask_copy + ',MASK')
+ raster=mask_copy + ',MASK')
except CalledModuleError:
grass.fatal(_('%s failed') % 'g.copy')
@@ -468,7 +468,7 @@
grass.run_command('g.remove',
quiet = True,
flags = 'fb',
- type = 'rast',
+ type = 'raster',
name = ','.join(maps))
# delete environmental variable which overrides region
@@ -506,7 +506,7 @@
try:
mask_copy = self.opt_output + self.original_mask_suffix
grass.run_command('g.copy', quiet=True,
- rast='MASK,' + mask_copy)
+ raster='MASK,' + mask_copy)
except CalledModuleError:
grass.fatal(_('%s failed') % 'g.copy')
Modified: grass/trunk/scripts/v.out.gps/v.out.gps.py
===================================================================
--- grass/trunk/scripts/v.out.gps/v.out.gps.py 2014-12-20 20:21:46 UTC (rev 63655)
+++ grass/trunk/scripts/v.out.gps/v.out.gps.py 2014-12-20 20:33:31 UTC (rev 63656)
@@ -174,7 +174,7 @@
inmap = tmp_extr
else:
- # g.copy "$GIS_OPT_INPUT,tmp_vogb_extr_$$" # to get a copy of DB into local mapset
+ # g.copy vector="$GIS_OPT_INPUT,tmp_vogb_extr_$$" # to get a copy of DB into local mapset
# INMAP="tmp_vogb_extr_$$"
inmap = input
Modified: grass/trunk/temporal/t.rast.out.vtk/t.rast.out.vtk.py
===================================================================
--- grass/trunk/temporal/t.rast.out.vtk/t.rast.out.vtk.py 2014-12-20 20:21:46 UTC (rev 63655)
+++ grass/trunk/temporal/t.rast.out.vtk/t.rast.out.vtk.py 2014-12-20 20:33:31 UTC (rev 63656)
@@ -119,7 +119,7 @@
if id is None:
id = null_map
- grass.run_command("g.copy", rast="%s,%s" % (id, map_name),
+ grass.run_command("g.copy", raster="%s,%s" % (id, map_name),
overwrite=True)
out_name = "%6.6i_%s.vtk" % (count, sp.base.get_name())
More information about the grass-commit
mailing list