Dear GRASS,
I am using the December 19 (2010) build of GRASS 6.4 for Windows. I have loaded a vector map (for a country with approx 20 province boundaries) with an attribute table that contains a continuous variable at the province level (name of column is y2009'). Trying to put the
y2009’ variable on the map, i begin with defining the color grading to be used by means of the following command:
“GRASS 6.4> v.colors map=pse column=y2009 rgb_column=hc2 color=bcyr”
Doing so I get the following error:
"GRASS 6.4> v.colors map=pse column=y2009 rgb_column=hc2 color=bcyr
Creating column …
Scanning values …
Looking up colors …
Writing 16 colors …
DBMI-SQLite driver error:
Error in sqlite3_prepare():
near “SET”: syntax error
ERROR: Error while executing: ‘UPDATE SET hc2 = ‘0:0:255’ WHERE y2009 =
0.094713’
ERROR: Processing SQL transaction
rm: cannot remove `C://test/poverty/.tmp/636.0_vcol.sql’: Permission denied"
Any idea what is creating the error – or what i am doing wrong? Is there a way to get around this/fix it?
Many thanks in advance!
Roy
Dear GRASS,
I am using the December 19 (2010) build of GRASS 6.4 for Windows. I have loaded a vector map (for a country with approx 20 province boundaries) with an attribute table that contains a continuous variable at the province level (name of column is y2009'). Trying to put the
y2009’ variable on the map, i begin with defining the color grading to be used by means of the following command:
“GRASS 6.4> v.colors map=pse column=y2009 rgb_column=hc2 color=bcyr”
Doing so I get the following error:
"GRASS 6.4> v.colors map=pse column=y2009 rgb_column=hc2 color=bcyr
Creating column …
Scanning values …
Looking up colors …
Writing 16 colors …
DBMI-SQLite driver error:
Error in sqlite3_prepare():
near “SET”: syntax error
ERROR: Error while executing: ‘UPDATE SET hc2 = ‘0:0:255’ WHERE y2009 =
0.094713’
ERROR: Processing SQL transaction
rm: cannot remove `C://test/poverty/.tmp/636.0_vcol.sql’: Permission denied"
Any idea what is creating the error – or what i am doing wrong? Is there a way to get around this/fix it?
I have a suggestion that might fix this problem. The v.colors script on line 209 uses the expression:
grep “^$GIS_OPT_LAYER;”
to isolate the TABLE name, and I think that the windows version of grep is confused by the semicolon ‘;’.
Please locate the script (should be under %GISBASE\scripts) and open it in an editor. Then replace line 209 as follows:
(original)
TABLE=v.db.connect -g map="$GIS_OPT_MAP" layer="$GIS_OPT_LAYER" fs=";" | grep "^$GIS_OPT_LAYER;" | cut -f2 -d';'
(change to:)
TABLE=v.db.connect -g map="$GIS_OPT_MAP" layer="$GIS_OPT_LAYER" fs=";" | grep "^$GIS_OPT_LAYER" | cut -f2 -d';'
(just remove the ; from “^$GIS_OPT_LAYER” after grep)
Let us know if this works.
Regards,
Micha
Hi Micha,
Many thanks for your quick response/fix!
I can confirm that it works!
Greetings!
Roy
-----Micha Silver micha@arava.co.il wrote: -----
To: rvanderweide@worldbank.org
From: Micha Silver micha@arava.co.il
Date: 12/19/2010 03:33PM
Cc: grass-user@lists.osgeo.org
Subject: Re: [GRASS-user] SQL Error using “v.color”
On 19/12/2010 14:44, rvanderweide@worldbank.org wrote:
Dear GRASS,
I am using the December 19 (2010) build of GRASS 6.4 for Windows. I have loaded a vector map (for a country with approx 20 province boundaries) with an attribute table that contains a continuous variable at the province level (name of column is y2009'). Trying to put the
y2009’ variable on the map, i begin with defining the color grading to be used by means of the following command:
“GRASS 6.4> v.colors map=pse column=y2009 rgb_column=hc2 color=bcyr”
Doing so I get the following error:
"GRASS 6.4> v.colors map=pse column=y2009 rgb_column=hc2 color=bcyr
Creating column …
Scanning values …
Looking up colors …
Writing 16 colors …
DBMI-SQLite driver error:
Error in sqlite3_prepare():
near “SET”: syntax error
ERROR: Error while executing: ‘UPDATE SET hc2 = ‘0:0:255’ WHERE y2009 =
0.094713’
ERROR: Processing SQL transaction
rm: cannot remove `C://test/poverty/.tmp/636.0_vcol.sql’: Permission denied"
Any idea what is creating the error – or what i am doing wrong? Is there a way to get around this/fix it?
I have a suggestion that might fix this problem. The v.colors script on line 209 uses the expression:
grep “^$GIS_OPT_LAYER;”
to isolate the TABLE name, and I think that the windows version of grep is confused by the semicolon ‘;’.
Please locate the script (should be under %GISBASE\scripts) and open it in an editor. Then replace line 209 as follows:
(original)
TABLE=v.db.connect -g map="$GIS_OPT_MAP" layer="$GIS_OPT_LAYER" fs=";" | grep "^$GIS_OPT_LAYER;" | cut -f2 -d';'
(change to:)
TABLE=v.db.connect -g map="$GIS_OPT_MAP" layer="$GIS_OPT_LAYER" fs=";" | grep "^$GIS_OPT_LAYER" | cut -f2 -d';'
(just remove the ; from “^$GIS_OPT_LAYER” after grep)
Let us know if this works.
Regards,
Micha
Many thanks in advance!
Roy
This mail was received via Mail-SeCure System.
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user
This mail was received via Mail-SeCure System.
Hi Micha,
To follow up on my problem and your fix, I am no longer getting the error message i used to get. When i look at the attribute table, however, the RGB_column variable (which i named `hc2’ in my example) – created by v.colors – has a lot of missing values.
Do you have an idea why this is the case?
Many thanks again!
Roy
-----Micha Silver micha@arava.co.il wrote: -----
To: rvanderweide@worldbank.org
From: Micha Silver micha@arava.co.il
Date: 12/19/2010 03:33PM
Cc: grass-user@lists.osgeo.org
Subject: Re: [GRASS-user] SQL Error using “v.color”
On 19/12/2010 14:44, rvanderweide@worldbank.org wrote:
Dear GRASS,
I am using the December 19 (2010) build of GRASS 6.4 for Windows. I have loaded a vector map (for a country with approx 20 province boundaries) with an attribute table that contains a continuous variable at the province level (name of column is y2009'). Trying to put the
y2009’ variable on the map, i begin with defining the color grading to be used by means of the following command:
“GRASS 6.4> v.colors map=pse column=y2009 rgb_column=hc2 color=bcyr”
Doing so I get the following error:
"GRASS 6.4> v.colors map=pse column=y2009 rgb_column=hc2 color=bcyr
Creating column …
Scanning values …
Looking up colors …
Writing 16 colors …
DBMI-SQLite driver error:
Error in sqlite3_prepare():
near “SET”: syntax error
ERROR: Error while executing: ‘UPDATE SET hc2 = ‘0:0:255’ WHERE y2009 =
0.094713’
ERROR: Processing SQL transaction
rm: cannot remove `C://test/poverty/.tmp/636.0_vcol.sql’: Permission denied"
Any idea what is creating the error – or what i am doing wrong? Is there a way to get around this/fix it?
I have a suggestion that might fix this problem. The v.colors script on line 209 uses the expression:
grep “^$GIS_OPT_LAYER;”
to isolate the TABLE name, and I think that the windows version of grep is confused by the semicolon ‘;’.
Please locate the script (should be under %GISBASE\scripts) and open it in an editor. Then replace line 209 as follows:
(original)
TABLE=v.db.connect -g map="$GIS_OPT_MAP" layer="$GIS_OPT_LAYER" fs=";" | grep "^$GIS_OPT_LAYER;" | cut -f2 -d';'
(change to:)
TABLE=v.db.connect -g map="$GIS_OPT_MAP" layer="$GIS_OPT_LAYER" fs=";" | grep "^$GIS_OPT_LAYER" | cut -f2 -d';'
(just remove the ; from “^$GIS_OPT_LAYER” after grep)
Let us know if this works.
Regards,
Micha
Many thanks in advance!
Roy
This mail was received via Mail-SeCure System.
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user
This mail was received via Mail-SeCure System.