[GRASS-SVN] r46714 - grass-addons/raster/r.colors.out_vtk
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Jun 15 05:49:52 EDT 2011
Author: hamish
Date: 2011-06-15 02:49:52 -0700 (Wed, 15 Jun 2011)
New Revision: 46714
Modified:
grass-addons/raster/r.colors.out_vtk/r.colors.out_vtk
Log:
more bugfixes
Modified: grass-addons/raster/r.colors.out_vtk/r.colors.out_vtk
===================================================================
--- grass-addons/raster/r.colors.out_vtk/r.colors.out_vtk 2011-06-15 09:41:48 UTC (rev 46713)
+++ grass-addons/raster/r.colors.out_vtk/r.colors.out_vtk 2011-06-15 09:49:52 UTC (rev 46714)
@@ -98,20 +98,16 @@
if [ $GIS_FLAG_N -eq 1 ] ; then
-
- eval `r.info -r "$GIS_OPT_MAP"`
-
r.colors.out -p map="$GIS_OPT_MAP" rules=- | grep '^[0-9]' | tr ':' ' ' | \
awk -v MIN="$min" -v MAX="$max" \
- '{ VALUE = ($1 - MIN)/(MAX - MIN)
- printf(" <Point x=\"%g\" o=\"%g\" r=\"%.3f\" g=\"%.3f\" b=\"%.3f\"/>\n", \
- VALUE, VALUE, $2/255., $3/255., $4/255.)}' \
+ '{ printf(" <Point x=\"%.15g\" o=\"%.15g\" r=\"%.3f\" g=\"%.3f\" b=\"%.3f\" />\n", \
+ $1/100., $1/100., $2/255., $3/255., $4/255.)}' \
>> "$GIS_OPT_OUTPUT"
RCO_EXITCODE=$?
else
r.colors.out map="$GIS_OPT_MAP" rules=- | grep '^[0-9]' | tr ':' ' ' | \
- awk '{printf(" <Point x=\"%g\" o=\"1\" r=\"%.3f\" g=\"%.3f\" b=\"%.3f\"/>\n", \
+ awk '{printf(" <Point x=\"%.15g\" o=\"1\" r=\"%.3f\" g=\"%.3f\" b=\"%.3f\" />\n", \
$1, $2/255., $3/255., $4/255.)}' >> "$GIS_OPT_OUTPUT"
RCO_EXITCODE=$?
More information about the grass-commit
mailing list