[GRASS-SVN] r60349 - grass/trunk/vector/v.sample
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon May 19 13:40:56 PDT 2014
Author: neteler
Date: 2014-05-19 13:40:56 -0700 (Mon, 19 May 2014)
New Revision: 60349
Modified:
grass/trunk/vector/v.sample/main.c
Log:
v.sample: use DB TRANSACTION to speed up
Modified: grass/trunk/vector/v.sample/main.c
===================================================================
--- grass/trunk/vector/v.sample/main.c 2014-05-19 19:20:33 UTC (rev 60348)
+++ grass/trunk/vector/v.sample/main.c 2014-05-19 20:40:56 UTC (rev 60349)
@@ -178,6 +178,7 @@
G_fatal_error(_("Unable to open database <%s> by driver <%s>"),
Fi->database, Fi->driver);
+ db_begin_transaction(Driver);
sprintf(buf,
"create table %s ( cat integer, pnt_val double precision, rast_val double precision, "
"diff double precision)", Fi->table);
@@ -262,6 +263,7 @@
Vect_write_line(&Out, GV_POINT, Points, Cats);
}
+ db_commit_transaction(Driver);
db_close_database_shutdown_driver(Driver);
Rast_close(fdrast);
More information about the grass-commit
mailing list