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 have a set of vector lines in grass which I need to convert into polygons. However, because of bad base data, the polygons don't always close. To fix this, I need to extend each disjointed line by a certain distance and connect it to the first line it hits. The problem is that I can't figure out how to do this. I have experimented with v.clean, v.generalize, v.edit, and (converting to a thinned raster) r.grow, r.neighbors and even r.flow, but I can't find anything which will let me do this.

Can anyone point me to a tool that would do this?

share|improve this question
    
possible duplicate of How do I draw on a vector map in GRASS? –  R.K. Oct 14 '12 at 17:55
add comment

1 Answer 1

You should use the tool v.clean with the option tool=snap and specify the correct thresh setting to snap the lines to the closest vertex. More details can be found here [1]

[1] http://grass.osgeo.org/gdp/html_grass64/v.clean.html

share|improve this answer
    
I tried that, but there are two problems: 1, it seems to snap to the first point found in threshold, not necessarily the closest. And 2, it also snaps ends which are already joined together. Am I doing something wrong? –  aquavitae Sep 14 '12 at 12:21
    
if there aren't too many polygons to edit, you could the use vector digitizer in the wxgui grass.osgeo.org/grass64/manuals/html64_user/… –  dmci Sep 14 '12 at 12:33
    
Only a few million... It definitely needs to be automatible. –  aquavitae Sep 14 '12 at 13:37
    
... then grass.osgeo.org/gdp/html_grass64/v.edit.html will be interesting. –  markusN Sep 14 '12 at 14:32
    
I looked at v.edit, but can't see a way to do it with that either. –  aquavitae Sep 26 '12 at 12:07
show 1 more comment

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.