<font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size="2"><div>Hi Hamish,<br><br>Many thanks for getting to the bottom of this!<br><br>"<font face="Courier New,Courier,monospace" size="3">Oh, and adding the table name to the layer by v.db.connect turns out to<br>be an SQLite thing (+v.in.ogr?), not a MS Windows thing."<br><br></font>Does this still pose a problem?<br><br>Greetings,<br><br>Roy<br><br><br></div><font color="#990099">-----Hamish <a class="moz-txt-link-rfc2396E" href="mailto:hamish_b@yahoo.com">&lt;hamish_b@yahoo.com&gt;</a> schreef: -----<br><br></font><blockquote style="padding-right: 0px; padding-left: 5px; margin-left: 5px; border-left: 2px solid #000000; margin-right: 0px;">Aan: <a class="moz-txt-link-abbreviated" href="mailto:rvanderweide@worldbank.org">rvanderweide@worldbank.org</a><br>Van: Hamish <a class="moz-txt-link-rfc2396E" href="mailto:hamish_b@yahoo.com">&lt;hamish_b@yahoo.com&gt;</a><br>Datum: 20-12-2010 03:21<br>cc: <a class="moz-txt-link-abbreviated" href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>Onderwerp: Re: [GRASS-user] SQL Error using "v.color"<br><br><font face="Courier New,Courier,monospace" size="3">Roy:<br>&gt;&nbsp;Is there also an alternative way to map a continuous variable (using<br>&gt; different grades of&nbsp;colour&nbsp;to fill&nbsp;the area contained by&nbsp;boundaries),<br>&gt; i.e. where you do not necessarily&nbsp;have to create your own rgb_column? <br>&gt; (I have noticed an option for random colour assignment, but that is not<br>&gt; exactly what i want.)<br><br>there is the d.vect.thematic module, but I'm not sure how well it works in<br>WinGrass. Anyway we've been moving a lot of its functionality directly into<br>d.vect, which makes things a lot cleaner internally.<br><br><br>I've found the trouble with your missing colors: v.colors uses the<br>r.what.color module to fetch the color value. But that uses %f to display<br>the queried value (so only to 6 numbers behind the decimal place), but your<br>normalized 0.0-1.0 data is given to a higher precision than that. So when<br>it tries to update the database it doesn't find exact matches, it<br>only provides a color for the rounded version. I've changed r.what.color<br>now to use %.15g in 6.5svn (r44635), if the others are happy with that we<br>can port it to the other branches. (the real solution is to rewrite<br>v.colors as a C module, and extend the color library to not assume raster<br>data)<br><br><br>Since this is SQLite I'm not too upset about using an equality to do the<br>floating-point number comparison as AFAIR sqlite uses strings for<br>everything internally, and (abs(column - value) &lt; epsilon) wouldn't<br>have helped in this case anyway.<br><br><br>Oh, and adding the table name to the layer by v.db.connect turns out to<br>be an SQLite thing (+v.in.ogr?), not a MS Windows thing.<br><br><br>I'll note but leave comments re. the classic dangers of interpreting<br>thematic mapping to others, as I don't have any good solutions to suggest<br>for resolving that.<br><br><br>Hamish<br><br><br><br>&nbsp;&nbsp; &nbsp; &nbsp;<br></font> </blockquote><br></font>