[GRASS-SVN] r38581 - grass/trunk/vector/lidar/v.lidar.growing
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Aug 2 09:28:30 EDT 2009
Author: neteler
Date: 2009-08-02 09:28:30 -0400 (Sun, 02 Aug 2009)
New Revision: 38581
Modified:
grass/trunk/vector/lidar/v.lidar.growing/main.c
Log:
strip off mapset from input for SQL
Modified: grass/trunk/vector/lidar/v.lidar.growing/main.c
===================================================================
--- grass/trunk/vector/lidar/v.lidar.growing/main.c 2009-08-02 13:25:50 UTC (rev 38580)
+++ grass/trunk/vector/lidar/v.lidar.growing/main.c 2009-08-02 13:28:30 UTC (rev 38581)
@@ -49,6 +49,7 @@
double minNS, minEW, maxNS, maxEW;
const char *mapset;
char buf[1024];
+ char xname[GNAME_MAX], xmapset[GMAPSET_MAX];
int colorBordo, ripieno, conta, lungPunti, lungHull, xi, c1, c2;
double altPiano;
@@ -121,6 +122,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);
}
@@ -173,11 +176,12 @@
db_zero_string(&sql);
sprintf(buf, "SELECT Interp,ID FROM %s_edge_Interpolation",
- in_opt->answer);
+ xname);
+ G_debug(1,"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;
@@ -498,6 +502,6 @@
db_close_database_shutdown_driver(driver);
- G_done_msg("");
+ G_done_msg(" ");
exit(EXIT_SUCCESS);
}
More information about the grass-commit
mailing list