[GRASS-SVN] r61817 - grass/trunk/vector/v.to.rast

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Sep 6 09:25:11 PDT 2014


Author: neteler
Date: 2014-09-06 09:25:11 -0700 (Sat, 06 Sep 2014)
New Revision: 61817

Modified:
   grass/trunk/vector/v.to.rast/raster.c
Log:
v.to.rast: tell user about actual RAM consumption

Modified: grass/trunk/vector/v.to.rast/raster.c
===================================================================
--- grass/trunk/vector/v.to.rast/raster.c	2014-09-06 13:21:42 UTC (rev 61816)
+++ grass/trunk/vector/v.to.rast/raster.c	2014-09-06 16:25:11 UTC (rev 61817)
@@ -1,6 +1,7 @@
 #include <grass/gis.h>
 #include <grass/raster.h>
 #include <grass/vector.h>
+#include <grass/glocale.h>
 #include "local.h"
 
 
@@ -60,6 +61,8 @@
     size = max_rows * region.cols;
     switch (format) {
     case USE_CELL:
+	G_important_message(_("Using at least %.1f GB of RAM (adjust with 'rows' parameter)"), 
+	    (double)region.rows * nrows * sizeof(CELL *) /1024 /1024 /1024);
 	raster.cell =
 	    (CELL **) G_calloc(max_rows * sizeof(char), sizeof(CELL *));
 	raster.cell[0] = (CELL *) G_calloc(size * sizeof(char), sizeof(CELL));
@@ -69,6 +72,8 @@
 	break;
 
     case USE_DCELL:
+	G_important_message(_("Using at least %.1f GB of RAM (adjust with 'rows' parameter)"),
+	    (double)region.rows * nrows * sizeof(DCELL *) /1024 /1024 /1024);
 	raster.dcell =
 	    (DCELL **) G_calloc(max_rows * sizeof(char), sizeof(DCELL *));
 	raster.dcell[0] =



More information about the grass-commit mailing list