[GRASS-SVN] r72994 - grass-addons/grass7/raster/r.category.trim
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Jul 18 04:40:32 PDT 2018
Author: pvanbosgeo
Date: 2018-07-18 04:40:31 -0700 (Wed, 18 Jul 2018)
New Revision: 72994
Modified:
grass-addons/grass7/raster/r.category.trim/r.category.trim.py
Log:
addon r.category.trim - workaround issue ticket 3604
Modified: grass-addons/grass7/raster/r.category.trim/r.category.trim.py
===================================================================
--- grass-addons/grass7/raster/r.category.trim/r.category.trim.py 2018-07-17 16:26:40 UTC (rev 72993)
+++ grass-addons/grass7/raster/r.category.trim/r.category.trim.py 2018-07-18 11:40:31 UTC (rev 72994)
@@ -85,6 +85,7 @@
from subprocess import PIPE
from grass.pygrass.modules import Module
import grass.script as gs
+import re
def main(options, flags):
@@ -120,6 +121,9 @@
RCOL = [x for x in RCOL if "nv" not in x and 'default' not in x]
RCOL = filter(None, RCOL)
CCAT = [z.split(' ')[0] for z in RCOL]
+ idx = [i for i, item in enumerate(CCAT) if not re.search('\.', item)]
+ CCAT = [CCAT[i] for i in idx]
+ RCOL = [RCOL[i] for i in idx]
CCAT = map(int, CCAT)
# Set strings / list to be used in loop
More information about the grass-commit
mailing list