[GRASS-user] DBMI-SQLite drive error when running i.segment.stats (with vector map creation)

James Duffy james.philip.duffy at gmail.com
Tue Oct 18 09:36:00 PDT 2016


Hello,

I'm running the following command:

i.segment.stats --overwrite --verbose
map=angle_seg_uspo_angle_region_1_rank1 at angle1 \
rasters=angle_ortho.1 at angle1,angle_ortho.2 at angle1,angle_ortho.3 at angle1
,angle_ortho.4 at angle1 \
raster_statistics=min,max,mean,stddev,sum
csvfile=/home/jd/Wales_GRASS/Angle/angle_isegstats \
separator=comma vectormap=angle_isegstats

This code produces a complete .csv when run without the 'vectormap' option.
However, when added in, I get the following errors:

Calculating geometry statistics
Calculating statistics for raster angle_ortho.1 at angle1
Calculating statistics for raster angle_ortho.2 at angle1
Calculating statistics for raster angle_ortho.3 at angle1
Calculating statistics for raster angle_ortho.4 at angle1
Creating vector map
DBMI-SQLite driver error:
Error in sqlite3_prepare():
unrecognized token: ".1_min"

ERROR: Error while executing: 'CREATE TABLE angle_isegstats (cat int, area
       double precision, perimeter double precision, compact_circle double
       precision, fd double precision, angle_ortho.1_min double precision,
       angle_ortho.1_max double precision, angle_ortho.1_mean double
       precision, angle_ortho.1_stddev double precision, angle_ortho.1_sum
       double precision, angle_ortho.2_min double precision,
       angle_ortho.2_max double precision, angle_ortho.2_mean double
       precision, angle_ortho.2_stddev double precision, angle_ortho.2_sum
       double precision, angle_ortho.3_min double precision,
       angle_ortho.3_max double precision, angle_ortho.3_mean double
       precision, angle_ortho.3_stddev double precision, angle_ortho.3_sum
       double precision, angle_ortho.4_min double precision,
       angle_ortho.4_max double precision, angle_ortho.4_mean double
       precision, angle_ortho.4_stddev double precision, angle_ortho.4_sum
       double precision)'
Traceback (most recent call last):
  File "/home/jd/.grass7/addons/scripts/i.segment.stats", line 250, in
<module>
    main()
  File "/home/jd/.grass7/addons/scripts/i.segment.stats", line 238, in main
    gscript.run_command('db.execute', input=insert_sql, quiet=True)
  File "/usr/lib/grass70/etc/python/grass/script/core.py", line 395, in
run_command
    return handle_errors(returncode, returncode, args, kwargs)
  File "/usr/lib/grass70/etc/python/grass/script/core.py", line 313, in
handle_errors
    returncode=returncode)
grass.exceptions.CalledModuleError: Module run None ['db.execute', '--q',
'input=/home/jd/Wales_GRASS/Angle/angle1/.tmp/jd-virtual-machine/6899.1']
ended with error
Process ended with non-zero return code 1. See errors in the (error) output.

I suspect this might be something to do with the length of the column name?

Any help would be much appreciated.

Thanks

James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20161018/d433f6c5/attachment.html>


More information about the grass-user mailing list