[GRASS-SVN] r70352 - grass/trunk/raster/r.in.lidar
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Jan 12 07:34:40 PST 2017
Author: martinl
Date: 2017-01-12 07:34:40 -0800 (Thu, 12 Jan 2017)
New Revision: 70352
Modified:
grass/trunk/raster/r.in.lidar/main.c
Log:
r.in.lidar (cosmetics): fix indent
progress when writing output
consolidate messages with r.in.xyz
Modified: grass/trunk/raster/r.in.lidar/main.c
===================================================================
--- grass/trunk/raster/r.in.lidar/main.c 2017-01-12 15:22:11 UTC (rev 70351)
+++ grass/trunk/raster/r.in.lidar/main.c 2017-01-12 15:34:40 UTC (rev 70352)
@@ -603,7 +603,7 @@
/* allocate memory for a single row of output data */
raster_row = Rast_allocate_output_buf(rtype);
- G_message(_("Reading data ..."));
+ G_message(_("Reading data..."));
count_total = line_total = 0;
@@ -611,7 +611,7 @@
for (pass = 1; pass <= npasses; pass++) {
if (npasses > 1)
- G_message(_("Pass #%d (of %d) ..."), pass, npasses);
+ G_message(_("Pass #%d (of %d)..."), pass, npasses);
/* figure out segmentation */
row0 = (pass - 1) * rows;
@@ -628,7 +628,7 @@
G_debug(2, "pass=%d/%d rows=%d", pass, npasses, rows);
- point_binning_allocate(&point_binning, rows, cols, rtype);
+ point_binning_allocate(&point_binning, rows, cols, rtype);
line = 0;
count = 0;
@@ -750,13 +750,16 @@
line_total += line;
/* calc stats and output */
- G_message(_("Writing to map ..."));
+ G_message(_("Writing output raster map..."));
for (row = 0; row < rows; row++) {
- /* potentially vector writing can be independent on the binning */
- write_values(&point_binning, &bin_index_nodes, raster_row, row,
- cols, rtype, NULL);
+ /* potentially vector writing can be independent on the binning */
+ write_values(&point_binning, &bin_index_nodes, raster_row, row,
+ cols, rtype, NULL);
+
+ G_percent(row, rows, 10);
+
/* write out line of raster data */
- Rast_put_row(out_fd, raster_row, rtype);
+ Rast_put_row(out_fd, raster_row, rtype);
}
/* free memory */
@@ -770,6 +773,8 @@
G_percent(1, 1, 1); /* flush */
G_free(raster_row);
+ G_message(_("%lu points found in input file(s)"), line_total);
+
/* close raster file & write history */
Rast_close(out_fd);
More information about the grass-commit
mailing list