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

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Nov 23 17:16:34 PST 2016


Author: wenzeslaus
Date: 2016-11-23 17:16:34 -0800 (Wed, 23 Nov 2016)
New Revision: 69887

Modified:
   grass-addons/grass7/raster3d/r3.profile/main.c
Log:
r3.profile: output resolution based on input raster

Modified: grass-addons/grass7/raster3d/r3.profile/main.c
===================================================================
--- grass-addons/grass7/raster3d/r3.profile/main.c	2016-11-23 23:09:46 UTC (rev 69886)
+++ grass-addons/grass7/raster3d/r3.profile/main.c	2016-11-24 01:16:34 UTC (rev 69887)
@@ -300,12 +300,12 @@
         if (!output_initialized) {
             Rast_get_window(&output_region);
             output_region.south = 0;
-            output_region.north = region.depths;
+            output_region.north = res * region.depths;
             output_region.west = 0;
-            output_region.east = values.num_items;
-            /* TODO: make the distances in the x and y directions right */
-            output_region.ew_res = 1;
-            output_region.ns_res = 1;
+            output_region.east = region.tb_res * values.num_items;
+            /* TODO: ew_res is more complex than just res, perhaps mean of distances if we store them */
+            output_region.ew_res = res;
+            output_region.ns_res = region.tb_res;
 
             Rast_set_output_window(&output_region);
             outfd = Rast_open_new(parm.raster_output->answer, data_type);



More information about the grass-commit mailing list