[GRASS-SVN] r41314 - grass-addons/raster/r.out.kml

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Mar 6 20:23:14 EST 2010


Author: hamish
Date: 2010-03-06 20:23:13 -0500 (Sat, 06 Mar 2010)
New Revision: 41314

Modified:
   grass-addons/raster/r.out.kml/r.out.kml
Log:
use background transparency for PNG export if available

Modified: grass-addons/raster/r.out.kml/r.out.kml
===================================================================
--- grass-addons/raster/r.out.kml/r.out.kml	2010-03-06 19:12:28 UTC (rev 41313)
+++ grass-addons/raster/r.out.kml/r.out.kml	2010-03-07 01:23:13 UTC (rev 41314)
@@ -167,7 +167,14 @@
 
 case "$GIS_OPT_FORMAT" in
    png)
-     r.out.png input="$MAP_NAME" output="$OUT_NAME.$IMG_EXT" --quiet
+     # NULL transparency flag new for r.out.png in GRASS 6.5+
+     if [ `r.out.png --interface-description | grep -c '<flag name="t">'` -eq 1 ] ; then
+	TRANSP="-t"
+     else
+	g.message -w "NULL cell transparency requires a newer version of GRASS"
+	TRANSP=""
+     fi
+     r.out.png input="$MAP_NAME" output="$OUT_NAME.$IMG_EXT" --quiet $TRANSP
      ;;
    jpeg)
      r.out.ppm input="$MAP_NAME" output="$OUT_NAME.ppm" --quiet



More information about the grass-commit mailing list