0

I'm facing a problem using the v.what.rast comand.

I'm trying to update the vector "canali" which represents some streams, with the slope value for every single point of the lines. The slope values are contained in the raster map "Pendenza".

I then created a column by entering:

v.db.addcol canali column='slope integer'

and that works fine: it creates an empty column named "slope".

Then I run the command line:

v.what.rast vector=canali@PERMANENT raster=Pendenza@PERMANENT column=slope

but it tells me the following:

No record for category 0 in table 1250 categories loaded from table 1 categories loaded from vector 1 categories from vector missing in table 0 duplicate categories in vector 0 records updated 0 update errors

Anyone out there can help me? I'm new to Grass and I don't want to give up!

1

You need to set the Computational region first to the raste map you want to query. Then run v.what.rast.

Ah, no need to give up, just ask more if needed :)

0

Try using the open source GIS Whitebox GAT (http://www.uoguelph.ca/~hydrogeo/Whitebox/), it's perfect for performing all sorts of stream network analysis.

enter image description here

  • 1
    Thank you for your rapid answer, but how I do I deal with the problem if I'm not working on stream network analysis? It should be an easy issue on GRASS GIS, using the r.what.vect command... – Chiara Sep 17 '13 at 13:24
  • I'm sorry, I assumed that from your question you were trying to calculate the channel slope for a stream network. I was suggesting that Whitebox GAT can do that. I must admit that I'm somewhat confused about what it is that your asking to do then. – user21951 Sep 17 '13 at 13:37
  • 1
    I need to know the value of a raster map in correspondence to a vector line. I read that the command line v.what.rast is meant to do that, but it's not working...any idea about hot I could solve the problem? Thanks for your attention and disposal! – Chiara Sep 17 '13 at 14:10
  • What about rasterizing the vector stream line and then extracting the slope values for the stream ID values? – user21951 Sep 17 '13 at 14:18
  • Ok, that's a good idea, but what if I'd also need to know which stream has that given slope? In the case I'm analyzing I have hundreds of streams, and I need to keep the stream name, together with its slope value. Plus, in the next steps of my analysis,I'm going to add the discharge information, so the vector table format looks like what I'm looking for,but I can't make it! I read something about using the v.category and v.db.select command before the v.what.rast, but honestly,I didn't really get the meaning of the operation, since I'm really new to the GIS world..any help really appreciated! – Chiara Sep 18 '13 at 6:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.