[GRASS-SVN] r70433 - grass-addons/grass7/raster/r.category.trim
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Jan 25 05:03:18 PST 2017
Author: pvanbosgeo
Date: 2017-01-25 05:03:18 -0800 (Wed, 25 Jan 2017)
New Revision: 70433
Modified:
grass-addons/grass7/raster/r.category.trim/r.category.trim.html
grass-addons/grass7/raster/r.category.trim/r.category.trim.py
Log:
r.category.trim addon: bug fix and small change help file
Modified: grass-addons/grass7/raster/r.category.trim/r.category.trim.html
===================================================================
--- grass-addons/grass7/raster/r.category.trim/r.category.trim.html 2017-01-25 09:38:32 UTC (rev 70432)
+++ grass-addons/grass7/raster/r.category.trim/r.category.trim.html 2017-01-25 13:03:18 UTC (rev 70433)
@@ -55,9 +55,14 @@
<h2>NOTE</h2>
-The file is only useful for categorical maps.
-Therefore only integer maps are accepted as input.
+The file is only useful for categorical maps. Therefore only integer maps are
+accepted as input. To export color maps for continuous raster layers (or as an
+alternative to this plugin), have a look at the r.colors.out_sld plugin. To
+get QGIS color files, you need a two step approach: (1) create a sld file using
+the r.colors.out_sld plugin, and (2) in QGIS, use the SLD4raster plugin to
+convert this to a qml file.
+
<p>When you use the option to recode the map, you need to set an
output map as well. It uses the <em><a href="r.recode">r.recode </a></em>
function, with the 'a' flag set, i.e., the region is
@@ -71,6 +76,8 @@
<a href="r.category.html">r.category</a>,
<a href="r.colors.html">r.colors</a>,
<a href="r.recode.html">r.recode</a>
+<a href="https://grass.osgeo.org/grass70/manuals/addons/r.colors.out_sld.html">
+r.colors.out_sld</a>
</em>
<h2>AUTHOR</h2>
Modified: grass-addons/grass7/raster/r.category.trim/r.category.trim.py
===================================================================
--- grass-addons/grass7/raster/r.category.trim/r.category.trim.py 2017-01-25 09:38:32 UTC (rev 70432)
+++ grass-addons/grass7/raster/r.category.trim/r.category.trim.py 2017-01-25 13:03:18 UTC (rev 70433)
@@ -135,7 +135,7 @@
RIDN = range(1, len(RID) + 1)
RLAB = [z.split('\t')[1] for z in RCAT]
for j in xrange(len(RID)):
- RECO = '{0}{1}:{1}:{2}\n'.format(RECO, RID[j], RIDN[J])
+ RECO = '{0}{1}:{1}:{2}\n'.format(RECO, RID[j], RIDN[j])
A = map(int, [i for i, x in enumerate(CCAT) if x == RIDI[j]])
CV.append(RCOL[A[0]].split(' ')[1])
CR = '{}{} {}\n'.format(CR, RIDN[j], CV[j])
More information about the grass-commit
mailing list