[GRASS-SVN] r39785 - grass/trunk/vector/lidar/v.outlier
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Nov 23 02:42:54 EST 2009
Author: mmetz
Date: 2009-11-23 02:42:49 -0500 (Mon, 23 Nov 2009)
New Revision: 39785
Modified:
grass/trunk/vector/lidar/v.outlier/main.c
Log:
fix for auxiliar table
Modified: grass/trunk/vector/lidar/v.outlier/main.c
===================================================================
--- grass/trunk/vector/lidar/v.outlier/main.c 2009-11-22 22:32:25 UTC (rev 39784)
+++ grass/trunk/vector/lidar/v.outlier/main.c 2009-11-23 07:42:49 UTC (rev 39785)
@@ -137,7 +137,8 @@
Thres_Outlier = atof(Thres_O_opt->answer);
/* Setting auxiliar table's name */
- sprintf(table_name, "%s_aux", out_opt->answer);
+ /* sprintf(table_name, "%s_aux", out_opt->answer); */
+ sprintf(table_name, "Auxiliar_outlier_table");
/* Checking vector names */
Vect_check_input_output_name(in_opt->answer, out_opt->answer,
@@ -191,6 +192,12 @@
G_fatal_error(_("No database connection for driver <%s> is defined. Run db.connect."),
dvr);
+ /*Something went wrong in a previous v.outlier execution */
+ if (db_table_exists(dvr, db, table_name)) {
+ if (P_Drop_Aux_Table(driver, table_name) != DB_OK)
+ G_fatal_error(_("Old auxiliar table could not be dropped"));
+ }
+
/* Setting regions and boxes */
G_get_set_window(&original_reg);
G_get_set_window(&elaboration_reg);
@@ -358,7 +365,7 @@
Vect_close(&Qgis);
}
- G_done_msg("");
+ G_done_msg(" ");
exit(EXIT_SUCCESS);
} /*!END MAIN */
More information about the grass-commit
mailing list