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

Blumentrath, Stefan Stefan.Blumentrath at nina.no
Wed Oct 19 01:42:05 PDT 2016


The “.” could be allowed if quoted identifiers were used, but that would be a quite invasive change and can have side effects on many other modules.
Furthermore quoted identifiers can be handled differently in the different DB backends, thus code complexity will increase.

In general it is also risky if the software alters your data (like renaming columns or even maps) at least if that behavior is not clearly documented...

Handling this in the code is at least not trivial as it either would require significant changes.

See also: https://trac.osgeo.org/grass/ticket/3071

Cheers
Stefan



From: grass-user [mailto:grass-user-bounces at lists.osgeo.org] On Behalf Of James Duffy
Sent: 19. oktober 2016 10:31
To: Helmut Kudrnovsky <hellik at web.de>
Cc: grass-user at lists.osgeo.org
Subject: Re: [GRASS-user] DBMI-SQLite drive error when running i.segment.stats (with vector map creation)

I think that you're correct.

v.db.addcolumn --verbose map=angle_region_1_poly at angle1 columns=test.test
gives:

Adding column <test.test> to the table
DBMI-SQLite driver error:
Error in sqlite3_prepare():
near ".": syntax error
DBMI-SQLite driver error:
Error in sqlite3_prepare():
near ".": syntax error
ERROR: Error while executing: 'ALTER TABLE angle_region_1_poly ADD COLUMN test.test'
ERROR: Unable to add column <test.test>.
Given that the default output names created when multi band rasters are read into GRASS with r.in.gdal contain a '.', and that these names can sometimes be used for labeling in vector operations (as I have described)...Is this something that can be rectified in the code of tools, or just something that should be worked around by the person using the tools?
I guess I could do this with a g.rename.
Thanks
James

On 18 October 2016 at 17:51, Helmut Kudrnovsky <hellik at web.de<mailto:hellik at web.de>> wrote:
>angle_ortho.1_min double precision

I suspect that it is the point in the column name.

to verify, try to add such a column name in one of your vectors.



-----
best regards
Helmut
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/DBMI-SQLite-drive-error-when-running-i-segment-stats-with-vector-map-creation-tp5291318p5291319.html
Sent from the Grass - Users mailing list archive at Nabble.com.
_______________________________________________
grass-user mailing list
grass-user at lists.osgeo.org<mailto:grass-user at lists.osgeo.org>
http://lists.osgeo.org/mailman/listinfo/grass-user



--
James Duffy
PhD Researcher
Environment and Sustainability Institute
Penryn Campus
University of Exeter
Penryn
Cornwall
TR10 9FE
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20161019/d361d85a/attachment-0001.html>


More information about the grass-user mailing list