I want to run a process that will make a table with lots of roads into distinct table of roads and than calculate the center of each road.

How can I auto merge segments with same name to one long segment ?

Attached example of 1 road built from 3 different segments , I want to make it one road and have it center point. (so I can zoom on it from OpenLayers)

enter image description here

  • Do you need the values of the center point or do you need it for styling purposes? A marker line style has the option to put a marker on the line center.
    – underdark
    Dec 20, 2012 at 11:51
  • I need it so I can setCenter on street using OpenLayers from a dropdownlist that will read the data after I export it to db.
    – Alophind
    Dec 20, 2012 at 13:11

1 Answer 1


To auto-merge features based on attributes I recommend the Dissolve-tool (Vector -> Geoprocessing Tools).


Appearently dissolve does not work on lines... You will have to use the Vector-> Geometry Tools-> Singleparts to Multipart tool.

  • I'm trying to use the tool but the Combo box of Input vector layer won't open (like its empty) while I have only 1 vector layer (Layer -> Add Vector Layer) in the project. Any idea why ?
    – Alophind
    Dec 20, 2012 at 10:29
  • What version of ftools/GDAL tolls do you have? (Check the plugin-installer)
    – GR_
    Dec 20, 2012 at 10:35
  • GDalTool ver 1.2.29 QGIS 1.8.0
    – Alophind
    Dec 20, 2012 at 11:07
  • Ftools 0.6.2 . Any idea ?!
    – Alophind
    Dec 20, 2012 at 11:08
  • 1
    I'm kinda running out of ideas... you could save the shape as a new file and try again, maybe that does the trick. Reinstalling ftools/GDAL tools is also an option.
    – GR_
    Dec 20, 2012 at 11:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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