[GRASS-SVN] r40975 - grass-addons/raster/r.out.gmt2

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Feb 13 05:23:12 EST 2010


Author: hamish
Date: 2010-02-13 05:23:12 -0500 (Sat, 13 Feb 2010)
New Revision: 40975

Modified:
   grass-addons/raster/r.out.gmt2/r.out.gmt2
Log:
merge fixes from r.out.gmt1

Modified: grass-addons/raster/r.out.gmt2/r.out.gmt2
===================================================================
--- grass-addons/raster/r.out.gmt2/r.out.gmt2	2010-02-13 10:18:27 UTC (rev 40974)
+++ grass-addons/raster/r.out.gmt2/r.out.gmt2	2010-02-13 10:23:12 UTC (rev 40975)
@@ -36,6 +36,7 @@
 
 #%module
 #% description: Exports a GRASS raster map into a GMT grd file and color table.
+#% keywords: raster, export, GMT
 #%end
 #%option
 #% key: input
@@ -114,7 +115,7 @@
 input_map="$map_name"
 
 if [ -z "$GIS_OPT_OUTPUT" ]; then
-    output_base="$GIS_OPT_INPUT"
+    output_base=`echo "$GIS_OPT_INPUT" | cut -f1 -d'@'`
 else
     output_base="$GIS_OPT_OUTPUT"
 fi
@@ -148,7 +149,7 @@
 cleanup()
 {
     if [ "$map_type" = "DCELL" ]; then
-	g.remove tmp_gmt_$$ > /dev/null
+	g.remove tmp_gmt_$$ --quiet
     fi
 }
 
@@ -164,9 +165,9 @@
 DCELL)
     map_tag="=1"
     echo "WARNING: Converting from double precision to floating point map" 1>&2
-    r.mapcalc "tmp_gmt_$$=float($map_name)"
+    r.mapcalc "tmp_gmt_$$ = float($map_name)"
     r.colors map="tmp_gmt_$$" raster="$map_name"
-    map_name=tmp_gmt_$$
+    map_name="tmp_gmt_$$"
     ;;
 esac
 



More information about the grass-commit mailing list