[GRASS-SVN] r38578 -
grass/branches/develbranch_6/vector/lidar/v.lidar.growing
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Aug 2 09:22:08 EDT 2009
Author: neteler
Date: 2009-08-02 09:22:08 -0400 (Sun, 02 Aug 2009)
New Revision: 38578
Modified:
grass/branches/develbranch_6/vector/lidar/v.lidar.growing/main.c
Log:
strip off mapset from input for SQL
Modified: grass/branches/develbranch_6/vector/lidar/v.lidar.growing/main.c
===================================================================
--- grass/branches/develbranch_6/vector/lidar/v.lidar.growing/main.c 2009-08-02 13:18:41 UTC (rev 38577)
+++ grass/branches/develbranch_6/vector/lidar/v.lidar.growing/main.c 2009-08-02 13:22:08 UTC (rev 38578)
@@ -46,6 +46,7 @@
double Thres_j, Thres_d, ew_resol, ns_resol;
double minNS, minEW, maxNS, maxEW;
char *mapset, buf[1024];
+ char xname[GNAME_MAX], xmapset[GMAPSET_MAX];
int colorBordo, ripieno, conta, lungPunti, lungHull, xi, c1, c2;
double altPiano;
@@ -117,6 +118,8 @@
/* Open input vector */
Vect_check_input_output_name(in_opt->answer, out_opt->answer,
GV_FATAL_EXIT);
+ if(G__name_is_fully_qualified(in_opt->answer, xname, xmapset) < 0 ) /* strip off mapset from input for SQL*/
+ G_fatal_error(_("Vector map <%s> not found"), xname);
if ((mapset = G_find_vector2(in_opt->answer, "")) == NULL) {
G_fatal_error(_("Vector map <%s> not found"), in_opt->answer);
}
@@ -169,11 +172,12 @@
db_zero_string(&sql);
sprintf(buf, "SELECT Interp,ID FROM %s_edge_Interpolation",
- in_opt->answer);
+ xname);
+ G_debug(0,"buf: %s", buf);
db_append_string(&sql, buf);
if (db_open_select_cursor(driver, &sql, &cursor, DB_SEQUENTIAL) != DB_OK)
- G_fatal_error(_("Unable to create table <%s_edge_Interpolation>"), in_opt->answer);
+ G_fatal_error(_("Unable to create table <%s_edge_Interpolation>"), xname);
count_obj = 1;
@@ -494,6 +498,6 @@
db_close_database_shutdown_driver(driver);
- G_done_msg("");
+ G_done_msg(" ");
exit(EXIT_SUCCESS);
}
More information about the grass-commit
mailing list