[GRASS-SVN] r72767 - grass/trunk/lib/raster

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Jun 4 12:58:36 PDT 2018


Author: mmetz
Date: 2018-06-04 12:58:36 -0700 (Mon, 04 Jun 2018)
New Revision: 72767

Modified:
   grass/trunk/lib/raster/vrt.c
Log:
libraster: optimize and comment Rast_get_vrt_row()

Modified: grass/trunk/lib/raster/vrt.c
===================================================================
--- grass/trunk/lib/raster/vrt.c	2018-06-04 12:44:28 UTC (rev 72766)
+++ grass/trunk/lib/raster/vrt.c	2018-06-04 19:58:36 UTC (rev 72767)
@@ -163,6 +163,8 @@
     G_free(vrt);
 }
 
+/* must only be called by get_map_row_nomask() 
+ * move to get_row.c as read_data_vrt() ? */
 int Rast_get_vrt_row(int fd, void *buf, int row, RASTER_MAP_TYPE data_type)
 {
     struct fileinfo *fcb = &R__.fileinfo[fd];
@@ -189,9 +191,12 @@
 	    int tfd;
 	    void *p1, *p2;
 
+	    /* recurse into get_map_row(), collect data for all tiles 
+	     * a mask is applied to the collected data 
+	     * after this function returns */
 	    Rast_set_null_value(tmpbuf, rd_window->cols, data_type);
 	    tfd = Rast_open_old(p->name, p->mapset);
-	    Rast_get_row(tfd, tmpbuf, row, data_type);
+	    Rast_get_row_nomask(tfd, tmpbuf, row, data_type);
 	    Rast_unopen(tfd);
 	    
 	    p1 = buf;



More information about the grass-commit mailing list