Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I want to vertorize the result of r.watershed (accumulation). After using r.to.vect I got the message that I have to use r.thin before. So I did, but the message comes again and again.

enter image description here

What I am doing wrong? Is there a better way to get a map of "potential" rivers of my area?

Thanks!

share|improve this question
1  
What kinds of values are in your accumulation grid? Usually they comprise a great range of either integer or floating point values. Floats usually cannot be vectorized. Vectorizing integers treats each distinct value as designating a distinct feature: that's probably not what you want and why GRASS is complaining. What kind of output are you looking for? –  whuber May 30 '12 at 15:22
    
The output in the image above is exactly what I want, I just need it in vector, not raster. That part about the kind of values is a good point! How can I check and/or change that? –  MAP May 30 '12 at 17:36
    
Usually, MAP, you can convert your output into a binary (0-1) image by comparing the stream accumulation to a threshold. The exact threshold to use is a matter of trial and error, but a good starting point often is the equivalent of a few hundred cells (it depends on how the accumulation is actually measured and on the cellsize). This makes all the heavier-flow streams into a single feature for extraction. Thinning it may enable the software to extract it as a polyline instead of a polygon. –  whuber May 30 '12 at 19:05
    
Thats it! I exported the raster to GeoTiff (converting to integer) and imported it back. So now its working perfectly! Thanks! –  MAP May 30 '12 at 20:09

2 Answers 2

You can only vectorize lines, not continuous fields. Hence use r.mapcalc with a threshold to extract line structures from that map, then subsequently r.thin. Then it will work as expected.

See also this Wiki page for more possibilities: http://grass.osgeo.org/wiki/R.stream.*

share|improve this answer

I think what you're looking for is the stream output from r.watershed, rather than the flow accumulation. It's an optional output; you'll need to make sure when you run r.watershed that you have a line similar to "stream=output". From the help:

stream

Output map: stream segments. Values correspond to the watershed basin values.

You may need to use r.thin before you can successfully convert to (polyline) vectors.

share|improve this answer
    
I dont need the streams, accumulation like the image above is exactly what I want. But I also tryed to vectorize the stream - same problem with r.thin. –  MAP May 30 '12 at 17:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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