[GRASS-user] v.color with layer 2

Hi to all

I have some problems with v.colors (grass6.5.svn) when I try to use it
with a vector on layer 2; I get this error:

DBMI-SQLite driver error:

Error in sqlite3_prepare():

near "mypoints2_2": syntax error

ERROR: Error while executing: 'UPDATE mypoints2

       mypoints2_2 SET GRASSRGB = '0:0:255' WHERE cat = 1'

ERROR: Processing SQL transaction

Here a little script that reproduces this error:

#!/bin/sh
# # spearfish60 dataset
db.connect database='$GISDBASE/$LOCATION_NAME/$MAPSET/mydbsqlite' driver=sqlite
g.copy vect=archsites,mypoints --overwrite
v.category in=mypoints layer=2 out=mypoints2 opt=add --overwrite
v.db.addtable mypoints2 layer=2
v.colors map=mypoints2 layer=2 color=bcyr column=cat

Where I'm wrong?
--
--
Paolo C.
Lat. 44° 39' 11.08'' N Long. 7° 23' 25.26'' E

On Thu, Mar 19, 2009 at 8:58 AM, Paolo Craveri <pcraveri@gmail.com> wrote:

Hi to all

I have some problems with v.colors (grass6.5.svn) when I try to use it
with a vector on layer 2; I get this error:

DBMI-SQLite driver error:

Error in sqlite3_prepare():

near "mypoints2_2": syntax error

ERROR: Error while executing: 'UPDATE mypoints2

  mypoints2\_2 SET GRASSRGB = &#39;0:0:255&#39; WHERE cat = 1&#39;

ERROR: Processing SQL transaction

Here a little script that reproduces this error:

Great - like this it was easy to reproduce here.

#!/bin/sh
# # spearfish60 dataset
db.connect database='$GISDBASE/$LOCATION_NAME/$MAPSET/mydbsqlite' driver=sqlite
g.copy vect=archsites,mypoints --overwrite
v.category in=mypoints layer=2 out=mypoints2 opt=add --overwrite
v.db.addtable mypoints2 layer=2
v.colors map=mypoints2 layer=2 color=bcyr column=cat

Where I'm wrong?

You aren't. It was a bug which I have now fixed:
http://trac.osgeo.org/grass/changeset/36412

(also in the other branches).

Thanks for catching it,
Markus