[GRASS-user] Problems with v.what.rast

Micha Silver micha at arava.co.il
Tue Jun 8 12:57:57 EDT 2010


On 06/08/2010 05:39 PM, Rebecca Bennett wrote:
> Dear all,
>
> 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:
>
> v.what.rast vector=Contour_points at PERMANENT raster=dartmoor1 at PERMANENT 
> layer=1 column=level
> More points (644858) of category 1, value set to 'NULL'
> 1 categories loaded from table
> 1 categories loaded from vector
> 0 categories from vector missing in table
> 1 duplicate categories in vector
> 1 records updated
> 0 update errors
>
Looks like all the points in Contour_points have the same cat value. 
Check this with:
v.category Contour_points opt=report

You can add new separate cat values for each point like this:
v.category Contour_points opt=del out=Contour_points_tmp
v.category Contour_points_tmp opt=add out=Contour_points_cats
(get rid of the tmp vector: g.remove vect=Contour_points_tmp)

Now check:
v.category Contour_points_cats opt=report

Next setup a column for the rast values:
v.db.addcol Contour_points_cats col="rast_value double"
(Is your raster an integer or float raster??)
And now you should be able to get the raster values into the points 
attrib table with:

v.what.rast Contour_points_cats rast=Dartmoor1 col=rast_value


> I think that this is an attribute table issue. I have followed the 
> instructions in Example B 
> http://grass.itc.it/grass62/manuals/html62_user/v.what.rast.html but  
> get the following message
>
> v.to.db map=Contour_points option=cat
> Reading features...
> Updating database...
> 1 categories read from vector map (layer 1)
> 1 records selected from table (layer 1)
> 1 categories read from vector map exist in selection from table
> 0 records updated/inserted (layer 1)
> Record (cat 1) already exists (not inserted)
>
> 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!
>
> Rebecca
>
>
>
> This mail was received via Mail-SeCure System.
>
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>
> This mail was received via Mail-SeCure System.
>
>
>    


-- 
Micha Silver
Arava Development Co. +972-52-3665918
http://surfaces.co.il


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20100608/0a03bbdb/attachment.html


More information about the grass-user mailing list