[GRASS-SVN] r74204 - grass/trunk/vector/v.surf.rst

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Mar 9 10:41:33 PST 2019


Author: mmetz
Date: 2019-03-09 10:41:33 -0800 (Sat, 09 Mar 2019)
New Revision: 74204

Modified:
   grass/trunk/vector/v.surf.rst/main.c
Log:
v.surf.rst: report human-readable disk space requirements

Modified: grass/trunk/vector/v.surf.rst/main.c
===================================================================
--- grass/trunk/vector/v.surf.rst/main.c	2019-03-09 18:38:22 UTC (rev 74203)
+++ grass/trunk/vector/v.surf.rst/main.c	2019-03-09 18:41:33 UTC (rev 74204)
@@ -695,9 +695,22 @@
     if (mcurv != NULL)
 	ddisk += disk;
     ddisk += sddisk;
-    G_verbose_message(_("Processing all selected output files "
-			"will require %d bytes of disk space for temp files"), ddisk);
 
+    G_message(_("Processing all selected output files will require"));
+    if (ddisk > 1024) {
+	if (ddisk > 1024 * 1024) {
+	    if (ddisk > 1024 * 1024 * 1024) {
+		G_message(_("%.2f GB of disk space for temp files."), ddisk / (1024. * 1024. * 1024.));
+	    }
+	    else
+		G_message(_("%.2f MB of disk space for temp files."), ddisk / (1024. * 1024.));
+	}
+	else
+	    G_message(_("%.2f KB of disk space for temp files."), ddisk / 1024.);
+    }
+    else
+	G_message(_("%d bytes of disk space for temp files."), (int)ddisk);
+
     deltx = xmax - xmin;
     delty = ymax - ymin;
     dnorm = sqrt((deltx * delty * KMIN) / NPOINT);



More information about the grass-commit mailing list