[GRASS-SVN] r56266 - grass/trunk/scripts/v.dissolve
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed May 15 09:27:17 PDT 2013
Author: martinl
Date: 2013-05-15 09:27:16 -0700 (Wed, 15 May 2013)
New Revision: 56266
Modified:
grass/trunk/scripts/v.dissolve/v.dissolve.py
Log:
v.dissolve: assume `layer=1` when `column` is given (default is `layer=-1`)
Modified: grass/trunk/scripts/v.dissolve/v.dissolve.py
===================================================================
--- grass/trunk/scripts/v.dissolve/v.dissolve.py 2013-05-15 14:26:26 UTC (rev 56265)
+++ grass/trunk/scripts/v.dissolve/v.dissolve.py 2013-05-15 16:27:16 UTC (rev 56266)
@@ -61,6 +61,11 @@
grass.run_command('v.extract', flags = 'd', input = input,
output = output, type = 'area', layer = layer)
else:
+ if int(layer) == -1:
+ grass.warning(_("Invalid layer number (%d). "
+ "Parameter '%s' specified, assuming layer '1'.") %
+ (int(layer), 'column'))
+ layer = '1'
try:
coltype = grass.vector_columns(input, layer)[column]
except KeyError:
More information about the grass-commit
mailing list