[GRASS-SVN] r73626 - grass-addons/grass7/raster/r.texture.tiled

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Oct 30 14:00:49 PDT 2018


Author: mlennert
Date: 2018-10-30 14:00:49 -0700 (Tue, 30 Oct 2018)
New Revision: 73626

Modified:
   grass-addons/grass7/raster/r.texture.tiled/r.texture.tiled.py
Log:
r.texture.tiled: file suffixes are not simple upper case of method parameters

Modified: grass-addons/grass7/raster/r.texture.tiled/r.texture.tiled.py
===================================================================
--- grass-addons/grass7/raster/r.texture.tiled/r.texture.tiled.py	2018-10-30 15:37:49 UTC (rev 73625)
+++ grass-addons/grass7/raster/r.texture.tiled/r.texture.tiled.py	2018-10-30 21:00:49 UTC (rev 73626)
@@ -91,6 +91,19 @@
         """Patch the final results."""
         bboxes = split_region_tiles(width=self.width, height=self.height)
         loc = Location()
+        methods_dic = {'asm' : 'ASM',
+                       'contrast' : 'Contr',
+                       'corr' : 'Corr',
+                       'var' : 'Var',
+                       'idm' : 'IDM',
+                       'sa' : 'SA',
+                       'sv' : 'SV',
+                       'se' : 'SE',
+                       'entr' : 'Entr',
+                       'dv' : 'DV',
+                       'de' : 'DE',
+                       'moc1' : 'MOC-1',
+                       'moc2' : 'MOC-2'}
         mset = loc[self.mset.name]
         mset.visible.extend(loc.mapsets())
         method = self.module.inputs['method'].value[0]
@@ -97,7 +110,7 @@
         for otmap in self.module.outputs:
             otm = self.module.outputs[otmap]
             if otm.typedesc == 'raster' and otm.value:
-                otm.value = '%s_%s' % (otm.value, method.upper())
+                otm.value = '%s_%s' % (otm.value, methods_dic[method])
                 rpatch_map(otm.value,
                            self.mset.name, self.msetstr, bboxes,
                            self.module.flags.overwrite,
@@ -104,7 +117,6 @@
                            self.start_row, self.start_col, self.out_prefix)
 
 
-
 def main():
 
     inputraster = options['input']



More information about the grass-commit mailing list