[GRASS-SVN] r69541 - grass-addons/grass7/raster3d/r3.profile

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Sep 20 07:54:39 PDT 2016


Author: wenzeslaus
Date: 2016-09-20 07:54:38 -0700 (Tue, 20 Sep 2016)
New Revision: 69541

Modified:
   grass-addons/grass7/raster3d/r3.profile/main.c
Log:
r3.profile: set output colors according to the input

Modified: grass-addons/grass7/raster3d/r3.profile/main.c
===================================================================
--- grass-addons/grass7/raster3d/r3.profile/main.c	2016-09-20 09:20:55 UTC (rev 69540)
+++ grass-addons/grass7/raster3d/r3.profile/main.c	2016-09-20 14:54:38 UTC (rev 69541)
@@ -327,6 +327,12 @@
     Rast3d_close(fd);
     fclose(fp);
 
+    struct Colors colors;
+
+    /* with any profile we always get the same colors */
+    Rast3d_read_colors(name, mapset, &colors);
+    Rast_write_colors(parm.raster_output->answer, G_mapset(), &colors);
+
     exit(EXIT_SUCCESS);
 }                               /* Done with main */
 



More information about the grass-commit mailing list