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 vector map that has two lines. I want to have the two connected. Is there a way for me to draw a line to connect the two? I am using GRASS gis by the way. The two lines that I want to connect are shown here: enter image description here

share|improve this question
    
which file format do you use? –  julien Mar 27 '11 at 20:40
1  
Do you want to modify the data underlying the map or just draw a line on the map? –  iant Mar 27 '11 at 21:11
    
I just want to draw a line on vector map (.shp). –  teamAngat Mar 28 '11 at 1:56
    
You need to go into editing mode :) See the menu where "2d view" is written. Note that this works in GRASS 7 and will do so in the future 6.4.2. Otherwise launch "v.edit" from command line or from the menu. –  markusN Mar 28 '11 at 22:54
add comment

3 Answers

try v.edit

enter image description here

share|improve this answer
    
I tried running v.edit then add, but it still did not connect the two lines –  teamAngat Mar 28 '11 at 2:52
    
see the option parameters : grass.osgeo.org/gdp/html_grass63/v.edit.html The tool=merge option seems to be appropriate, no? –  simo Mar 28 '11 at 10:10
    
In the settings, set the appropriate snapping distance. Easiest done in map units. –  markusN Mar 28 '11 at 23:32
    
I tried v.edit map=vector tool=connect id=1,2 thresh=-1,700 but it still did not connect –  teamAngat Mar 29 '11 at 2:25
add comment

I think that is a nice use case possibility of Quantum GIS as an interface to GRASS, helped by the standard "GRASS ToolBox" plugin :)

share|improve this answer
2  
Please also indicate how qgis might be used in this example. Otherwise one could just as easily say "this is nice use case for using Mapinfo for ...", or any other of the hundreds of programs which can edit and join lines. –  matt wilkie Apr 27 '11 at 15:13
2  
QGIS can integrate nicely with GRASS, and act as a graphic interface, with the help of the standard "GRASS Toolbox" plugin. Cf. the tutorials: youtube.com/… –  Laurent Jégou Apr 27 '11 at 17:31
    
Nice. I didn't know there was a collection of video turorials. I'd fold the comment into your answer so it's all in one place (use the edit link in grey under the post) –  matt wilkie Apr 28 '11 at 16:33
add comment

I tried to use v.edit to snap or connect lines but it seems not to work. Actually on connect does nothing, and on snap delete the lines. You should try v.clean, which also has the snap option, but with v.edit you can also use a query, so is nicer.

share|improve this answer
add 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.