[GRASS-SVN] r74210 - grass/trunk/tools
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Mar 9 11:02:45 PST 2019
Author: mmetz
Date: 2019-03-09 11:02:45 -0800 (Sat, 09 Mar 2019)
New Revision: 74210
Modified:
grass/trunk/tools/thumbnails.py
Log:
thumbnails for color rules: prettify special cases
Modified: grass/trunk/tools/thumbnails.py
===================================================================
--- grass/trunk/tools/thumbnails.py 2019-03-09 18:59:56 UTC (rev 74209)
+++ grass/trunk/tools/thumbnails.py 2019-03-09 19:02:45 UTC (rev 74210)
@@ -74,6 +74,19 @@
minval += abs(minval / 100)
maxval = float(records[-1][0])
maxval = min(maxval, 2500000)
+ if os.path.basename(path) in ('ndvi', 'ndwi', 'ndwi2'):
+ minval = -1.0
+ maxval = 1.0
+ if os.path.basename(path) == 'ndvi_MODIS':
+ minval = -10000.0
+ maxval = 10000.0
+ if os.path.basename(path) == 'population_dens':
+ maxval = 1000.0
+ if os.path.basename(path) == 'precipitation':
+ maxval = 2000.0
+ if os.path.basename(path) in ('terrain', 'srtm', 'srtm_plus'):
+ minval = -500.0
+ maxval = 3000.0
grad = tmp_grad_abs
grass.mapcalc("$grad = "
" float($min) + (col() - 1) * "
@@ -149,6 +162,8 @@
if var in os.environ:
del os.environ[var]
+ os.environ['GRASS_ANTIALIAS'] = 'none'
+
grass.use_temp_region()
grass.run_command('g.region', s=0, w=0, n=height, e=width,
rows=height, cols=width, res=1, flags='a')
More information about the grass-commit
mailing list