<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html style="direction: ltr;">
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
<title></title>
</head>
<body style="direction: ltr;" bgcolor="#ffffff" text="#000000">
Milton Cezar Ribeiro wrote:
<blockquote
cite="mid:64f1583f0905180923w4d917d75r814ca018d6c3e6cc@mail.gmail.com"
type="cite">
<div>Hi there,</div>
<div> </div>
<div>Sorry to expand a little bit this thread. I have a vector map
with 10 thousands of records, and for each record I have a set of about
10 attributes. Now I would like to generate a raster map from one
attribute of vector map. But on vector I have CHAR values like: "Low",
"Medium" and "High", and I would like that my raster map get values 1,
2 and 3, respectively.</div>
</blockquote>
How about adding 10 new attribute columns of type integer, then give
these columns values of 1,2,3... based on the original 10 CHAR columns:<br>
v.db.addcol <vector_map> col=(attr1 integer, attr2 integer, attr3
integer....)<br>
echo "UPDATE <vector_map> SET attr1=1 WHERE charattr1='Low' " |
db.execute<br>
echo "UPDATE <vector_map> SET attr1=2 WHERE charattr1='Medium' "
| db.execute<br>
....<br>
Then run v.surf.rst (or whatever interpolation you chose) to create
your raster surfaces based on the integer attributes.<br>
--<br>
Micha<br>
<br>
<blockquote
cite="mid:64f1583f0905180923w4d917d75r814ca018d6c3e6cc@mail.gmail.com"
type="cite">
<div> </div>
<div>Any help are welcome.<br>
</div>
<div>milton</div>
<div>brazil=toronto<br>
</div>
<div class="gmail_quote">2009/5/18 Micha Silver <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:micha@arava.co.il">micha@arava.co.il</a>></span><br>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">
<div class="im">Offenthaler Ivo wrote:<br>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">What
would you suggest as the most convenient way to update a small (60
points) vector map? E.g. a map's attribute "pollution_level" for a
given point-ID (attribute "sitecode") has to be updated, based on some
plain text output (columns "sitecode" and "pollution level") of another
software?<br>
<br>
</blockquote>
</div>
In a command shell, you might find something like this will do it:<br>
<br>
while read sc pl<br>
do<br>
echo "UPDATE <vect_point_map> SET pollution_level=$pl WHERE
sitecode=$sc" | db.execute<br>
done < plain_text_file<br>
<br>
This assumes that the plain_text_file is just two columns, sitecode and
pollution_level. You can loop thru the new values any way that's
convenient. The line:<br>
echo "UPDATE .... WHERE ..." | db.execute<br>
is what does the work.<br>
-- <br>
Micha<br>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">
<div class="im">Many thanks in advance! Ivo<br>
<br>
_______________________________________________<br>
grass-user mailing list<br>
<a moz-do-not-send="true" href="mailto:grass-user@lists.osgeo.org"
target="_blank">grass-user@lists.osgeo.org</a><br>
<a moz-do-not-send="true"
href="http://lists.osgeo.org/mailman/listinfo/grass-user"
target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br>
<br>
<br>
<br>
</div>
This mail was received via Mail-SeCure System.<br>
<br>
<br>
<br>
</blockquote>
<div>
<div class="h5"><br>
_______________________________________________<br>
grass-user mailing list<br>
<a moz-do-not-send="true" href="mailto:grass-user@lists.osgeo.org"
target="_blank">grass-user@lists.osgeo.org</a><br>
<a moz-do-not-send="true"
href="http://lists.osgeo.org/mailman/listinfo/grass-user"
target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br>
</div>
</div>
</blockquote>
</div>
<br>
<br>
<br>
This mail was received via Mail-SeCure System.<br>
<br>
</blockquote>
<br>
</body>
</html>