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

  • 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? – Ian Turton 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

try v.edit

enter image description here

  • 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

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

  • 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

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.

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.