[GRASS-SVN] r50841 - grass/trunk/raster/r.grow.distance

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Feb 17 03:17:09 EST 2012


Author: mmetz
Date: 2012-02-17 00:17:08 -0800 (Fri, 17 Feb 2012)
New Revision: 50841

Modified:
   grass/trunk/raster/r.grow.distance/main.c
Log:
glynn: scale needs to be squared for metric=squared

Modified: grass/trunk/raster/r.grow.distance/main.c
===================================================================
--- grass/trunk/raster/r.grow.distance/main.c	2012-02-17 06:45:00 UTC (rev 50840)
+++ grass/trunk/raster/r.grow.distance/main.c	2012-02-17 08:17:08 UTC (rev 50841)
@@ -208,8 +208,11 @@
     else
 	G_fatal_error(_("Unknown metric: '%s'"), opt.met->answer);
 
-    if (flag.m->answer)
+    if (flag.m->answer) {
 	scale = G_database_units_to_meters_factor();
+	if (strcmp(opt.met->answer, "squared") == 0)
+	    scale *= scale;
+    }
 
     in_fd = Rast_open_old(in_name, "");
 



More information about the grass-commit mailing list