[GRASS-SVN] r49732 - grass/trunk/vector/v.in.lidar

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Dec 14 04:11:59 EST 2011


Author: hamish
Date: 2011-12-14 01:11:59 -0800 (Wed, 14 Dec 2011)
New Revision: 49732

Modified:
   grass/trunk/vector/v.in.lidar/main.c
Log:
minor cleanup of location creation and extending region code

Modified: grass/trunk/vector/v.in.lidar/main.c
===================================================================
--- grass/trunk/vector/v.in.lidar/main.c	2011-12-14 07:56:46 UTC (rev 49731)
+++ grass/trunk/vector/v.in.lidar/main.c	2011-12-14 09:11:59 UTC (rev 49732)
@@ -210,7 +210,7 @@
     extend_flag = G_define_flag();
     extend_flag->key = 'e';
     extend_flag->description =
-	_("Extend location extents based on new dataset");
+	_("Extend region extents based on new dataset");
 
     no_import_flag = G_define_flag();
     no_import_flag->key = 'i';
@@ -349,9 +349,13 @@
 
         /* If the i flag is set, clean up? and exit here */
         if(no_import_flag->answer)
-        {
             exit(EXIT_SUCCESS);
-        }
+
+	/*  TODO: */
+	G_warning("Import into new location not yet implemented");
+	/* at this point the module should be using G__create_alt_env()
+	    to change context to the newly created location; once done
+	    it should switch back with G__switch_env(). See r.in.gdal */
     }
     else {
 	int err = 0;
@@ -364,10 +368,7 @@
 
 	/* Does the projection of the current location match the dataset? */
 	/* G_get_window seems to be unreliable if the location has been changed */
-	if (outloc_opt->answer)
-	    G__get_window(&loc_wind, "", "DEFAULT_WIND", "PERMANENT");
-	else
-	    G_get_set_window(&loc_wind);
+	G_get_default_window(&loc_wind);
 	/* fetch LOCATION PROJ info */
 	if (loc_wind.proj != PROJECTION_XY) {
 	    loc_proj_info = G_get_projinfo();
@@ -460,8 +461,8 @@
 	    G_fatal_error(error_msg);
 	}
 	else {
-	    G_message(_("Projection of input dataset and current location "
-			"appear to match"));
+	    G_verbose_message(_("Projection of input dataset and current "
+				"location appear to match"));
 	}
     }
 
@@ -803,10 +804,7 @@
 				  / loc_wind.ew_res);
 	loc_wind.east = loc_wind.west + loc_wind.cols * loc_wind.ew_res;
 
-	if (outloc_opt->answer)
-	    G__put_window(&loc_wind, "../PERMANENT", "DEFAULT_WIND");
-	else
-	    G_put_window(&loc_wind);
+	G_put_window(&loc_wind);
     }
 
     exit(EXIT_SUCCESS);



More information about the grass-commit mailing list