Hi Markus<br><br>Here is the output:<br><br>+ v.db.connect map=catchments -g fs=;<br>+ grep -w 1<br>+ TABLE=catchments<br>+ [ -z catchments ]<br>+ BASECOLS=n min max range mean stddev variance cf_var sum<br>+ [ 0 -eq 1 ]<br>
+ EXTRACOLS=<br>+ unset ADDCOLS<br>+ [ 1 -eq 1 ]<br>+ echo prec_n<br>+ cut -b1-10<br>+ CURRCOLUMN=prec_n<br>+ sed s+$+|+g<br>+ <a href="http://v.info">v.info</a> -c catchments --quiet<br>+ grep |prec_n| --quiet<br>+ sed s+^+|+g<br>
+ [ 1 -eq 0 ]<br>+ [ -n ]<br>+ [ n = n ]<br>+ COLTYPE=INTEGER<br>+ ADDCOLS= prec_n INTEGER<br>+ [ 1 -eq 1 ]<br>+ echo prec_min<br>+ cut -b1-10<br>+ CURRCOLUMN=prec_min<br>+ sed s+$+|+g<br>+ <a href="http://v.info">v.info</a> -c catchments --quiet<br>
+ grep |prec_min| --quiet<br>+ sed s+^+|+g<br>+ [ 1 -eq 0 ]<br>+ [ -n prec_n INTEGER ]<br>+ ADDCOLS= prec_n INTEGER,<br>+ [ min = n ]<br>+ COLTYPE=DOUBLE PRECISION<br>+ ADDCOLS= prec_n INTEGER, prec_min DOUBLE PRECISION<br>
+ [ 1 -eq 1 ]<br>+ echo prec_max<br>+ cut -b1-10<br>+ CURRCOLUMN=prec_max<br>+ grep |prec_max| --quiet<br>+ sed s+$+|+g<br>+ <a href="http://v.info">v.info</a> -c catchments --quiet<br>+ sed s+^+|+g<br>+ [ 1 -eq 0 ]<br>+ [ -n prec_n INTEGER, prec_min DOUBLE PRECISION ]<br>
+ ADDCOLS= prec_n INTEGER, prec_min DOUBLE PRECISION,<br>+ [ max = n ]<br>+ COLTYPE=DOUBLE PRECISION<br>+ ADDCOLS= prec_n INTEGER, prec_min DOUBLE PRECISION, prec_max DOUBLE PRECISION<br>+ [ 1 -eq 1 ]<br>+ echo prec_range<br>
+ cut -b1-10<br>+ CURRCOLUMN=prec_range<br>+ sed s+$+|+g<br>+ <a href="http://v.info">v.info</a> -c catchments --quiet<br>+ grep |prec_range| --quiet<br>+ sed s+^+|+g<br>+ [ 1 -eq 0 ]<br>+ [ -n prec_n INTEGER, prec_min DOUBLE PRECISION, prec_max DOUBLE PRECISION ]<br>
+ ADDCOLS= prec_n INTEGER, prec_min DOUBLE PRECISION, prec_max DOUBLE PRECISION,<br>+ [ range = n ]<br>+ COLTYPE=DOUBLE PRECISION<br>+ ADDCOLS= prec_n INTEGER, prec_min DOUBLE PRECISION, prec_max DOUBLE PRECISION, prec_range DOUBLE PRECISION<br>
+ [ 1 -eq 1 ]<br>+ cut -b1-10<br>+ echo prec_mean<br>+ CURRCOLUMN=prec_mean<br>+ sed s+$+|+g<br>+ <a href="http://v.info">v.info</a> -c catchments --quiet<br>+ grep |prec_mean| --quiet<br>+ sed s+^+|+g<br>+ [ 1 -eq 0 ]<br>
+ [ -n prec_n INTEGER, prec_min DOUBLE PRECISION, prec_max DOUBLE PRECISION, prec_range DOUBLE PRECISION ]<br>+ ADDCOLS= prec_n INTEGER, prec_min DOUBLE PRECISION, prec_max DOUBLE PRECISION, prec_range DOUBLE PRECISION,<br>
+ [ mean = n ]<br>+ COLTYPE=DOUBLE PRECISION<br>+ ADDCOLS= prec_n INTEGER, prec_min DOUBLE PRECISION, prec_max DOUBLE PRECISION, prec_range DOUBLE PRECISION, prec_mean DOUBLE PRECISION<br>+ [ 1 -eq 1 ]<br>+ echo prec_stddev<br>
+ cut -b1-10<br>+ CURRCOLUMN=prec_stdde<br>+ sed s+$+|+g<br>+ <a href="http://v.info">v.info</a> -c catchments --quiet<br>+ grep |prec_stdde| --quiet<br>+ sed s+^+|+g<br>+ [ 1 -eq 0 ]<br>+ [ -n prec_n INTEGER, prec_min DOUBLE PRECISION, prec_max DOUBLE PRECISION, prec_range DOUBLE PRECISION, prec_mean DOUBLE PRECISION ]<br>
+ ADDCOLS= prec_n INTEGER, prec_min DOUBLE PRECISION, prec_max DOUBLE PRECISION, prec_range DOUBLE PRECISION, prec_mean DOUBLE PRECISION,<br>+ [ stddev = n ]<br>+ COLTYPE=DOUBLE PRECISION<br>+ ADDCOLS= prec_n INTEGER, prec_min DOUBLE PRECISION, prec_max DOUBLE PRECISION, prec_range DOUBLE PRECISION, prec_mean DOUBLE PRECISION, prec_stdde DOUBLE PRECISION<br>
+ [ 1 -eq 1 ]<br>+ echo prec_variance<br>+ cut -b1-10<br>+ CURRCOLUMN=prec_varia<br>+ sed s+$+|+g<br>+ grep |prec_varia| --quiet<br>+ <a href="http://v.info">v.info</a> -c catchments --quiet<br>+ sed s+^+|+g<br>+ [ 1 -eq 0 ]<br>
+ [ -n prec_n INTEGER, prec_min DOUBLE PRECISION, prec_max DOUBLE PRECISION, prec_range DOUBLE PRECISION, prec_mean DOUBLE PRECISION, prec_stdde DOUBLE PRECISION ]<br>+ ADDCOLS= prec_n INTEGER, prec_min DOUBLE PRECISION, prec_max DOUBLE PRECISION, prec_range DOUBLE PRECISION, prec_mean DOUBLE PRECISION, prec_stdde DOUBLE PRECISION,<br>
+ [ variance = n ]<br>+ COLTYPE=DOUBLE PRECISION<br>+ ADDCOLS= prec_n INTEGER, prec_min DOUBLE PRECISION, prec_max DOUBLE PRECISION, prec_range DOUBLE PRECISION, prec_mean DOUBLE PRECISION, prec_stdde DOUBLE PRECISION, prec_varia DOUBLE PRECISION<br>
+ [ 1 -eq 1 ]<br>+ echo prec_cf_var<br>+ cut -b1-10<br>+ CURRCOLUMN=prec_cf_va<br>+ sed s+$+|+g<br>+ <a href="http://v.info">v.info</a> -c catchments --quiet<br>+ grep |prec_cf_va| --quiet<br>+ sed s+^+|+g<br>+ [ 1 -eq 0 ]<br>
+ [ -n prec_n INTEGER, prec_min DOUBLE PRECISION, prec_max DOUBLE PRECISION, prec_range DOUBLE PRECISION, prec_mean DOUBLE PRECISION, prec_stdde DOUBLE PRECISION, prec_varia DOUBLE PRECISION ]<br>+ ADDCOLS= prec_n INTEGER, prec_min DOUBLE PRECISION, prec_max DOUBLE PRECISION, prec_range DOUBLE PRECISION, prec_mean DOUBLE PRECISION, prec_stdde DOUBLE PRECISION, prec_varia DOUBLE PRECISION,<br>
+ [ cf_var = n ]<br>+ COLTYPE=DOUBLE PRECISION<br>+ ADDCOLS= prec_n INTEGER, prec_min DOUBLE PRECISION, prec_max DOUBLE PRECISION, prec_range DOUBLE PRECISION, prec_mean DOUBLE PRECISION, prec_stdde DOUBLE PRECISION, prec_varia DOUBLE PRECISION, prec_cf_va DOUBLE PRECISION<br>
+ [ 1 -eq 1 ]<br>+ echo prec_sum<br>+ cut -b1-10<br>+ CURRCOLUMN=prec_sum<br>+ grep |prec_sum| --quiet<br>+ sed s+^+|+g<br>+ <a href="http://v.info">v.info</a> -c catchments --quiet<br>+ sed s+$+|+g<br>+ [ 1 -eq 0 ]<br>+ [ -n prec_n INTEGER, prec_min DOUBLE PRECISION, prec_max DOUBLE PRECISION, prec_range DOUBLE PRECISION, prec_mean DOUBLE PRECISION, prec_stdde DOUBLE PRECISION, prec_varia DOUBLE PRECISION, prec_cf_va DOUBLE PRECISION ]<br>
+ ADDCOLS= prec_n INTEGER, prec_min DOUBLE PRECISION, prec_max DOUBLE PRECISION, prec_range DOUBLE PRECISION, prec_mean DOUBLE PRECISION, prec_stdde DOUBLE PRECISION, prec_varia DOUBLE PRECISION, prec_cf_va DOUBLE PRECISION,<br>
+ [ sum = n ]<br>+ COLTYPE=DOUBLE PRECISION<br>+ ADDCOLS= prec_n INTEGER, prec_min DOUBLE PRECISION, prec_max DOUBLE PRECISION, prec_range DOUBLE PRECISION, prec_mean DOUBLE PRECISION, prec_stdde DOUBLE PRECISION, prec_varia DOUBLE PRECISION, prec_cf_va DOUBLE PRECISION, prec_sum DOUBLE PRECISION<br>
+ g.message -v Adding columns < prec_n INTEGER, prec_min DOUBLE PRECISION, prec_max DOUBLE PRECISION, prec_range DOUBLE PRECISION, prec_mean DOUBLE PRECISION, prec_stdde DOUBLE PRECISION, prec_varia DOUBLE PRECISION, prec_cf_va DOUBLE PRECISION, prec_sum DOUBLE PRECISION><br>
+ v.db.addcol map=catchments columns= prec_n INTEGER, prec_min DOUBLE PRECISION, prec_max DOUBLE PRECISION, prec_range DOUBLE PRECISION, prec_mean DOUBLE PRECISION, prec_stdde DOUBLE PRECISION, prec_varia DOUBLE PRECISION, prec_cf_va DOUBLE PRECISION, prec_sum DOUBLE PRECISION<br>
+ [ 0 -ne 0 ]<br>+ g.message -v Processing data ...<br>+ CURRNUM=1<br>+ rm -f /home/tgumede1/grassdata/Cape_Town/Original/SRTMDEM/PERMANENT/.tmp/tgumede1-desktop/23218.0.sql<br>+ [ 0 -eq 1 ]<br>+ EXTSTAT=<br>+ cat /home/tgumede1/grassdata/Cape_Town/Original/SRTMDEM/PERMANENT/.tmp/tgumede1-desktop/23218.0.cats<br>
+ g.message -v message=Processing category 262 (1/4)<br>+ g.remove MASK --quiet<br>+ GRASS_VERBOSE=0 r.mapcalc MASK=if(catchments_23218.0 == 262, 1, null())<br>+ unset n min max range mean stddev variance cf_var sum<br>+ r.univar -g map=trmm percentile=90<br>
+ sed s+nan+NULL+g<br>+ eval n=0 null_cells=12 min=-NULL max=-NULL range=-NULL mean=-NULL mean_of_abs=-NULL stddev=-NULL variance=-NULL coeff_var=-NULL sum=0<br>+ n=0 null_cells=12 min=-NULL max=-NULL range=-NULL mean=-NULL mean_of_abs=-NULL stddev=-NULL variance=-NULL coeff_var=-NULL sum=0<br>
+ cf_var=-NULL<br>+ [ 0 -eq 1 ]<br>+ eval value=${n}<br>+ value=0<br>+ [ 1 -eq 1 ]<br>+ echo prec_n<br>+ cut -b1-10<br>+ colname=prec_n<br>+ echo UPDATE catchments SET prec_n=0 WHERE cat=262;<br>+ eval value=${min}<br>+ value=-NULL<br>
+ [ 1 -eq 1 ]<br>+ echo prec_min<br>+ cut -b1-10<br>+ colname=prec_min<br>+ echo UPDATE catchments SET prec_min=-NULL WHERE cat=262;<br>+ eval value=${max}<br>+ value=-NULL<br>+ [ 1 -eq 1 ]<br>+ echo prec_max<br>+ cut -b1-10<br>
+ colname=prec_max<br>+ echo UPDATE catchments SET prec_max=-NULL WHERE cat=262;<br>+ eval value=${range}<br>+ value=-NULL<br>+ [ 1 -eq 1 ]<br>+ echo prec_range<br>+ cut -b1-10<br>+ colname=prec_range<br>+ echo UPDATE catchments SET prec_range=-NULL WHERE cat=262;<br>
+ eval value=${mean}<br>+ value=-NULL<br>+ [ 1 -eq 1 ]<br>+ cut -b1-10<br>+ echo prec_mean<br>+ colname=prec_mean<br>+ echo UPDATE catchments SET prec_mean=-NULL WHERE cat=262;<br>+ eval value=${stddev}<br>+ value=-NULL<br>
+ [ 1 -eq 1 ]<br>+ cut -b1-10<br>+ echo prec_stddev<br>+ colname=prec_stdde<br>+ echo UPDATE catchments SET prec_stdde=-NULL WHERE cat=262;<br>+ eval value=${variance}<br>+ value=-NULL<br>+ [ 1 -eq 1 ]<br>+ cut -b1-10<br>
+ echo prec_variance<br>+ colname=prec_varia<br>+ echo UPDATE catchments SET prec_varia=-NULL WHERE cat=262;<br>+ eval value=${cf_var}<br>+ value=-NULL<br>+ [ 1 -eq 1 ]<br>+ cut -b1-10<br>+ echo prec_cf_var<br>+ colname=prec_cf_va<br>
+ echo UPDATE catchments SET prec_cf_va=-NULL WHERE cat=262;<br>+ eval value=${sum}<br>+ value=0<br>+ [ 1 -eq 1 ]<br>+ cut -b1-10<br>+ echo prec_sum<br>+ colname=prec_sum<br>+ echo UPDATE catchments SET prec_sum=0 WHERE cat=262;<br>
+ expr 1 + 1<br>+ CURRNUM=2<br>+ g.message -v message=Processing category 549 (2/4)<br>+ g.remove MASK --quiet<br>+ GRASS_VERBOSE=0 r.mapcalc MASK=if(catchments_23218.0 == 549, 1, null())<br>+ unset n min max range mean stddev variance cf_var sum<br>
+ r.univar -g map=trmm percentile=90<br>+ sed s+nan+NULL+g<br>+ eval n=0 null_cells=12 min=-NULL max=-NULL range=-NULL mean=-NULL mean_of_abs=-NULL stddev=-NULL variance=-NULL coeff_var=-NULL sum=0<br>+ n=0 null_cells=12 min=-NULL max=-NULL range=-NULL mean=-NULL mean_of_abs=-NULL stddev=-NULL variance=-NULL coeff_var=-NULL sum=0<br>
+ cf_var=-NULL<br>+ [ 0 -eq 1 ]<br>+ eval value=${n}<br>+ value=0<br>+ [ 1 -eq 1 ]<br>+ echo prec_n<br>+ cut -b1-10<br>+ colname=prec_n<br>+ echo UPDATE catchments SET prec_n=0 WHERE cat=549;<br>+ eval value=${min}<br>+ value=-NULL<br>
+ [ 1 -eq 1 ]<br>+ echo prec_min<br>+ cut -b1-10<br>+ colname=prec_min<br>+ echo UPDATE catchments SET prec_min=-NULL WHERE cat=549;<br>+ eval value=${max}<br>+ value=-NULL<br>+ [ 1 -eq 1 ]<br>+ echo prec_max<br>+ cut -b1-10<br>
+ colname=prec_max<br>+ echo UPDATE catchments SET prec_max=-NULL WHERE cat=549;<br>+ eval value=${range}<br>+ value=-NULL<br>+ [ 1 -eq 1 ]<br>+ cut -b1-10<br>+ echo prec_range<br>+ colname=prec_range<br>+ echo UPDATE catchments SET prec_range=-NULL WHERE cat=549;<br>
+ eval value=${mean}<br>+ value=-NULL<br>+ [ 1 -eq 1 ]<br>+ echo prec_mean<br>+ cut -b1-10<br>+ colname=prec_mean<br>+ echo UPDATE catchments SET prec_mean=-NULL WHERE cat=549;<br>+ eval value=${stddev}<br>+ value=-NULL<br>
+ [ 1 -eq 1 ]<br>+ echo prec_stddev<br>+ cut -b1-10<br>+ colname=prec_stdde<br>+ echo UPDATE catchments SET prec_stdde=-NULL WHERE cat=549;<br>+ eval value=${variance}<br>+ value=-NULL<br>+ [ 1 -eq 1 ]<br>+ echo prec_variance<br>
+ cut -b1-10<br>+ colname=prec_varia<br>+ echo UPDATE catchments SET prec_varia=-NULL WHERE cat=549;<br>+ eval value=${cf_var}<br>+ value=-NULL<br>+ [ 1 -eq 1 ]<br>+ echo prec_cf_var<br>+ cut -b1-10<br>+ colname=prec_cf_va<br>
+ echo UPDATE catchments SET prec_cf_va=-NULL WHERE cat=549;<br>+ eval value=${sum}<br>+ value=0<br>+ [ 1 -eq 1 ]<br>+ echo prec_sum<br>+ cut -b1-10<br>+ colname=prec_sum<br>+ echo UPDATE catchments SET prec_sum=0 WHERE cat=549;<br>
+ expr 2 + 1<br>+ CURRNUM=3<br>+ g.message -v message=Processing category 724 (3/4)<br>+ g.remove MASK --quiet<br>+ GRASS_VERBOSE=0 r.mapcalc MASK=if(catchments_23218.0 == 724, 1, null())<br>+ unset n min max range mean stddev variance cf_var sum<br>
+ r.univar -g map=trmm percentile=90<br>+ sed s+nan+NULL+g<br>+ eval n=0 null_cells=12 min=-NULL max=-NULL range=-NULL mean=-NULL mean_of_abs=-NULL stddev=-NULL variance=-NULL coeff_var=-NULL sum=0<br>+ n=0 null_cells=12 min=-NULL max=-NULL range=-NULL mean=-NULL mean_of_abs=-NULL stddev=-NULL variance=-NULL coeff_var=-NULL sum=0<br>
+ cf_var=-NULL<br>+ [ 0 -eq 1 ]<br>+ eval value=${n}<br>+ value=0<br>+ [ 1 -eq 1 ]<br>+ cut -b1-10<br>+ echo prec_n<br>+ colname=prec_n<br>+ echo UPDATE catchments SET prec_n=0 WHERE cat=724;<br>+ eval value=${min}<br>+ value=-NULL<br>
+ [ 1 -eq 1 ]<br>+ echo prec_min<br>+ cut -b1-10<br>+ colname=prec_min<br>+ echo UPDATE catchments SET prec_min=-NULL WHERE cat=724;<br>+ eval value=${max}<br>+ value=-NULL<br>+ [ 1 -eq 1 ]<br>+ echo prec_max<br>+ cut -b1-10<br>
+ colname=prec_max<br>+ echo UPDATE catchments SET prec_max=-NULL WHERE cat=724;<br>+ eval value=${range}<br>+ value=-NULL<br>+ [ 1 -eq 1 ]<br>+ echo prec_range<br>+ cut -b1-10<br>+ colname=prec_range<br>+ echo UPDATE catchments SET prec_range=-NULL WHERE cat=724;<br>
+ eval value=${mean}<br>+ value=-NULL<br>+ [ 1 -eq 1 ]<br>+ echo prec_mean<br>+ cut -b1-10<br>+ colname=prec_mean<br>+ echo UPDATE catchments SET prec_mean=-NULL WHERE cat=724;<br>+ eval value=${stddev}<br>+ value=-NULL<br>
+ [ 1 -eq 1 ]<br>+ echo prec_stddev<br>+ cut -b1-10<br>+ colname=prec_stdde<br>+ echo UPDATE catchments SET prec_stdde=-NULL WHERE cat=724;<br>+ eval value=${variance}<br>+ value=-NULL<br>+ [ 1 -eq 1 ]<br>+ echo prec_variance<br>
+ cut -b1-10<br>+ colname=prec_varia<br>+ echo UPDATE catchments SET prec_varia=-NULL WHERE cat=724;<br>+ eval value=${cf_var}<br>+ value=-NULL<br>+ [ 1 -eq 1 ]<br>+ echo prec_cf_var<br>+ cut -b1-10<br>+ colname=prec_cf_va<br>
+ echo UPDATE catchments SET prec_cf_va=-NULL WHERE cat=724;<br>+ eval value=${sum}<br>+ value=0<br>+ [ 1 -eq 1 ]<br>+ echo prec_sum<br>+ cut -b1-10<br>+ colname=prec_sum<br>+ echo UPDATE catchments SET prec_sum=0 WHERE cat=724;<br>
+ expr 3 + 1<br>+ CURRNUM=4<br>+ g.message -v message=Processing category 733 (4/4)<br>+ g.remove MASK --quiet<br>+ GRASS_VERBOSE=0 r.mapcalc MASK=if(catchments_23218.0 == 733, 1, null())<br>+ unset n min max range mean stddev variance cf_var sum<br>
+ r.univar -g map=trmm percentile=90<br>+ sed s+nan+NULL+g<br>+ eval n=0 null_cells=12 min=-NULL max=-NULL range=-NULL mean=-NULL mean_of_abs=-NULL stddev=-NULL variance=-NULL coeff_var=-NULL sum=0<br>+ n=0 null_cells=12 min=-NULL max=-NULL range=-NULL mean=-NULL mean_of_abs=-NULL stddev=-NULL variance=-NULL coeff_var=-NULL sum=0<br>
+ cf_var=-NULL<br>+ [ 0 -eq 1 ]<br>+ eval value=${n}<br>+ value=0<br>+ [ 1 -eq 1 ]<br>+ echo prec_n<br>+ cut -b1-10<br>+ colname=prec_n<br>+ echo UPDATE catchments SET prec_n=0 WHERE cat=733;<br>+ eval value=${min}<br>+ value=-NULL<br>
+ [ 1 -eq 1 ]<br>+ echo prec_min<br>+ cut -b1-10<br>+ colname=prec_min<br>+ echo UPDATE catchments SET prec_min=-NULL WHERE cat=733;<br>+ eval value=${max}<br>+ value=-NULL<br>+ [ 1 -eq 1 ]<br>+ echo prec_max<br>+ cut -b1-10<br>
+ colname=prec_max<br>+ echo UPDATE catchments SET prec_max=-NULL WHERE cat=733;<br>+ eval value=${range}<br>+ value=-NULL<br>+ [ 1 -eq 1 ]<br>+ echo prec_range<br>+ cut -b1-10<br>+ colname=prec_range<br>+ echo UPDATE catchments SET prec_range=-NULL WHERE cat=733;<br>
+ eval value=${mean}<br>+ value=-NULL<br>+ [ 1 -eq 1 ]<br>+ echo prec_mean<br>+ cut -b1-10<br>+ colname=prec_mean<br>+ echo UPDATE catchments SET prec_mean=-NULL WHERE cat=733;<br>+ eval value=${stddev}<br>+ value=-NULL<br>
+ [ 1 -eq 1 ]<br>+ echo prec_stddev<br>+ cut -b1-10<br>+ colname=prec_stdde<br>+ echo UPDATE catchments SET prec_stdde=-NULL WHERE cat=733;<br>+ eval value=${variance}<br>+ value=-NULL<br>+ [ 1 -eq 1 ]<br>+ echo prec_variance<br>
+ cut -b1-10<br>+ colname=prec_varia<br>+ echo UPDATE catchments SET prec_varia=-NULL WHERE cat=733;<br>+ eval value=${cf_var}<br>+ value=-NULL<br>+ [ 1 -eq 1 ]<br>+ echo prec_cf_var<br>+ cut -b1-10<br>+ colname=prec_cf_va<br>
+ echo UPDATE catchments SET prec_cf_va=-NULL WHERE cat=733;<br>+ eval value=${sum}<br>+ value=0<br>+ [ 1 -eq 1 ]<br>+ echo prec_sum<br>+ cut -b1-10<br>+ colname=prec_sum<br>+ echo UPDATE catchments SET prec_sum=0 WHERE cat=733;<br>
+ expr 4 + 1<br>+ CURRNUM=5<br>+ g.message -v Updating the database ...<br>+ db.execute input=/home/tgumede1/grassdata/Cape_Town/Original/SRTMDEM/PERMANENT/.tmp/tgumede1-desktop/23218.0.sql database=/home/tgumede1/grassdata/Cape_Town/Original/SRTMDEM/PERMANENT/dbf/ driver=dbf<br>
DBMI-DBF driver error:<br>SQL parser error: syntax error, unexpected NULL_VALUE processing 'NULL'<br>in statement:<br>UPDATE catchments SET prec_min=-NULL WHERE cat=262<br>Error in db_execute_immediate()<br><br>ERROR: Error while executing: 'UPDATE catchments SET prec_min=-NULL WHERE<br>
cat=262'<br>+ EXITCODE=1<br>+ g.remove MASK --quiet<br>+ cleanup<br>+ g.region region=23218.0<br>+ g.remove region=23218.0 --quiet<br>+ g.remove rast=catchments_23218.0 --quiet<br>+ g.remove MASK --quiet<br>+ [ 0 -eq 1 ]<br>
+ rm -f /home/tgumede1/grassdata/Cape_Town/Original/SRTMDEM/PERMANENT/.tmp/tgumede1-desktop/23218.0 23218.0 /home/tgumede1/grassdata/Cape_Town/Original/SRTMDEM/PERMANENT/.tmp/tgumede1-desktop/23218.0.cats /home/tgumede1/grassdata/Cape_Town/Original/SRTMDEM/PERMANENT/.tmp/tgumede1-desktop/23218.0.sql<br>
+ [ 1 -eq 0 ]<br>+ exit 1<br><br><br><div class="gmail_quote">On Fri, Jul 16, 2010 at 10:12 PM, Markus Neteler <span dir="ltr"><<a href="mailto:neteler@osgeo.org">neteler@osgeo.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
On Thu, Jul 15, 2010 at 1:10 PM, Sandile Gumede <<a href="mailto:akasandile@gmail.com">akasandile@gmail.com</a>> wrote:<br>
...<br>
<div class="im">>> I'm using GTOPO30 DEM data and TRMM (rainfall) data, I selected the data<br>
>> for the whole of africa but I'm getting an error when executing<br>
>> v.rast.stats.<br>
</div>...<br>
<div class="im">>> v.rast.stats vector=catchments raster=rainfall colprefix=precip<br>
>> WARNING: Area without centroid (may be OK for island)<br>
>> WARNING: Area without centroid (may be OK for island)<br>
>> WARNING: Area without centroid (may be OK for island)<br>
>> DBMI-DBF driver error:<br>
>> SQL parser error: syntax error, unexpected NULL_VALUE processing 'NULL'<br>
>> in statement:<br>
>> UPDATE catchments SET precip_cf_=-NULL WHERE cat=17<br>
>> Error in db_execute_immediate()<br>
>><br>
>> ERROR: Error while executing: 'UPDATE catchments SET precip_cf_=-NULL<br>
>> WHERE<br>
>> cat=17'<br>
<br>
</div>There is a minus sign in front of NULL - never seen that and likely not<br>
SQL compliant (at least for the DBF driver which is just an enhanced table<br>
driver).<br>
<br>
Maybe it comes from here?<br>
<br>
[neteler@localhost v.rast.stats]$ grep NULL *<br>
v.rast.stats: eval `r.univar -g $EXTSTAT map="$RASTER"<br>
percentile="$GIS_OPT_PERCENTILE" | sed 's+nan+NULL+g'`<br>
<br>
but AFAIK r.univar would not output -nan.<br>
<br>
Please edit your v.rast.stats script ("which v.rast.stats") to find<br>
the path if on Unix-like OS)<br>
and change the first line from<br>
<br>
#!/bin/sh<br>
<br>
to<br>
<br>
#!/bin/sh -x<br>
<br>
and run it again. From the detailed output you may see where this spurious "-"<br>
comes in and tell us about it.<br>
<font color="#888888"><br>
Markus<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Kind Regards<br>TS Gumede<br>CSIR, Meraka Institute<br>072 258 1650<br><br>