[GRASS-dev] [GRASS-SVN] r58804 - grass/trunk/raster/r.contour

On Wed, Jan 29, 2014 at 8:13 PM, <svn_grass@osgeo.org> wrote:

Author: martinl
Date: 2014-01-29 11:13:24 -0800 (Wed, 29 Jan 2014)
New Revision: 58804

Modified:
   grass/trunk/raster/r.contour/main.c
Log:
r.contour: write attributes in one commit (speed-up)

This commit is magic..! Great catch, Martin.

I have backported it to GRASS 6 in r58827 and r58828.

Proof:
GRASS 6.4.4svn (nc_spm_08): > db.connect -p
driver:sqlite
database:$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db
...

GRASS 6.4.4svn (nc_spm_08):> g.region rast=elevation -p

GRASS 6.4.4svn (nc_spm_08):> time -p r.contour input=elevation \
    output=elevation_dem_contours minlevel=50 maxlevel=160 step=2 --o
...
Writing vector contours (total levels 51)...
100%
Writing attributes...
Building topology for vector map <elevation_dem_contours>...
Registering primitives...
5102 primitives registered
927348 vertices registered
...
Number of nodes: 5813
Number of primitives: 5102
...
real 11.46 <=== before
user 1.99
sys 0.16

GRASS 6.4.4svn (nc_spm_08):> time -p r.contour input=elevation \
   output=elevation_dem_contours minlevel=50 maxlevel=160 step=2 --o
...
Number of nodes: 5813
Number of primitives: 5102
...
real 2.88 <=== !! after, now with SQL transaction
user 2.00
sys 0.09

Markus