<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 06/08/2010 05:39 PM, Rebecca Bennett wrote:
<blockquote cite="mid:368213.63293.qm@web28410.mail.ukl.yahoo.com"
type="cite">
<style type="text/css"><!-- DIV {margin:0px;} --></style>
<div
style="font-family: verdana,helvetica,sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
<div>Dear all,<br>
<br>
I'm having some trouble copying the values from a raster image
(Dartmoor1) to a series of vector points (Contour_points - created from
a contour vector map). When I try to use v.what.rast I get the
following error:<br>
<br>
v.what.rast vector=Contour_points@PERMANENT raster=dartmoor1@PERMANENT
layer=1 column=level<br>
More points (644858) of category 1, value set to 'NULL'<br>
1 categories loaded from table<br>
1 categories loaded from vector<br>
0 categories from vector missing in table<br>
1 duplicate categories in vector<br>
1 records updated<br>
0 update errors<br>
<br>
</div>
</div>
</blockquote>
Looks like all the points in Contour_points have the same cat value.
Check this with:<br>
v.category Contour_points opt=report<br>
<br>
You can add new separate cat values for each point like this:<br>
v.category Contour_points opt=del out=Contour_points_tmp<br>
v.category Contour_points_tmp opt=add out=Contour_points_cats <br>
(get rid of the tmp vector: g.remove vect=Contour_points_tmp)<br>
<br>
Now check:<br>
v.category Contour_points_cats opt=report<br>
<br>
Next setup a column for the rast values:<br>
v.db.addcol Contour_points_cats col="rast_value double" <br>
(Is your raster an integer or float raster??)<br>
And now you should be able to get the raster values into the points
attrib table with:<br>
<br>
v.what.rast Contour_points_cats rast=Dartmoor1 col=rast_value <br>
<br>
<br>
<blockquote cite="mid:368213.63293.qm@web28410.mail.ukl.yahoo.com"
type="cite">
<div
style="font-family: verdana,helvetica,sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
<div><span>I think that this is an attribute table issue. I have
followed the instructions in Example B <a moz-do-not-send="true"
target="_blank"
href="http://grass.itc.it/grass62/manuals/html62_user/v.what.rast.html">http://grass.itc.it/grass62/manuals/html62_user/v.what.rast.html</a>
but get the following message </span><br>
<br>
v.to.db map=Contour_points option=cat<br>
Reading features...<br>
Updating database...<br>
1 categories read from vector map (layer 1)<br>
1 records selected from table (layer 1)<br>
1 categories read from vector map exist in selection from table<br>
0 records updated/inserted (layer 1)<br>
Record (cat 1) already exists (not inserted)<br>
<br>
I have also tried creating and attaching a new table but get the same
result for v.what.vect. Any ideas welcome, thanks for reading!<br>
<br>
Rebecca<br>
</div>
</div>
<br>
<br>
<br>
This mail was received via Mail-SeCure System.<br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
grass-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/grass-user">http://lists.osgeo.org/mailman/listinfo/grass-user</a>
This mail was received via Mail-SeCure System.
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Micha Silver
Arava Development Co. +972-52-3665918
<a class="moz-txt-link-freetext" href="http://surfaces.co.il">http://surfaces.co.il</a>
</pre>
</body>
</html>