|
@@ -137,7 +137,8 @@ int main(int argc, char *argv[])
|
|
|
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 @@ int main(int argc, char *argv[])
|
|
|
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 @@ int main(int argc, char *argv[])
|
|
|
Vect_close(&Qgis);
|
|
|
}
|
|
|
|
|
|
- G_done_msg("");
|
|
|
+ G_done_msg(" ");
|
|
|
|
|
|
exit(EXIT_SUCCESS);
|
|
|
} /*!END MAIN */
|