Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
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 '12 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 '12 at 13:11

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.

share|improve this answer
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 '12 at 10:29
What version of ftools/GDAL tolls do you have? (Check the plugin-installer) – GR_ Dec 20 '12 at 10:35
GDalTool ver 1.2.29 QGIS 1.8.0 – Alophind Dec 20 '12 at 11:07
Ftools 0.6.2 . Any idea ?! – Alophind Dec 20 '12 at 11:08
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 '12 at 11:13

Your Answer


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.