[GRASS-SVN] r55402 - grass/trunk/vector/v.overlay
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Mar 16 07:41:45 PDT 2013
Author: martinl
Date: 2013-03-16 07:41:45 -0700 (Sat, 16 Mar 2013)
New Revision: 55402
Modified:
grass/trunk/vector/v.overlay/main.c
Log:
v.overlay: use temporary vector maps
Modified: grass/trunk/vector/v.overlay/main.c
===================================================================
--- grass/trunk/vector/v.overlay/main.c 2013-03-16 14:40:42 UTC (rev 55401)
+++ grass/trunk/vector/v.overlay/main.c 2013-03-16 14:41:45 UTC (rev 55402)
@@ -11,7 +11,7 @@
* OGR support by Martin Landa <landa.martin gmail.com>
* Markus Metz
* PURPOSE:
- * COPYRIGHT: (C) 2003-2009 by the GRASS Development Team
+ * COPYRIGHT: (C) 2003-2009, 2012-2013 by the GRASS Development Team
*
* This program is free software under the GNU General
* Public License (>=v2). Read the file COPYING that
@@ -41,7 +41,6 @@
*ofield_opt, *operator_opt, *snap_opt;
struct Flag *table_flag;
struct Map_info In[2], Out, Tmp;
- char *tmpname;
struct line_pnts *Points, *Points2;
struct line_cats *Cats;
struct ilist *BList;
@@ -49,7 +48,7 @@
int verbose;
struct field_info *Fi = NULL;
- char buf[1000];
+ char buf[DB_SQL_MAX];
dbString stmt;
dbString sql, value_string, col_defs;
dbDriver *driver;
@@ -187,8 +186,7 @@
Vect_set_person(&Out, G_whoami());
Vect_hist_command(&Out);
- G_asprintf(&tmpname, "%s_tmp_%d", out_opt->answer, getpid());
- Vect_open_new(&Tmp, tmpname, WITHOUT_Z);
+ Vect_open_tmp_new(&Tmp, NULL, WITHOUT_Z);
/* Create dblinks */
if (ofield[0] > 0) {
@@ -293,7 +291,6 @@
}
if (nlines_out == 0) {
Vect_close(&Tmp);
- Vect_delete(tmpname);
Vect_close(&Out);
Vect_delete(out_opt->answer);
G_fatal_error(_("No %s features found in vector map <%s>. Verify '%s' parameter."),
@@ -556,10 +553,8 @@
}
Vect_close(&Tmp);
- Vect_delete(tmpname);
-
+
/* Build topology to show the final result and prepare for Vect_close() */
- G_message(_("Building topology..."));
Vect_build(&Out);
if (driver) {
More information about the grass-commit
mailing list