This question already has an answer here:

I have 2 vector line layers. They are subjacent, so one of them is exactly on top of the other but the features have different nodes and attributes.

My goal is to create labels and descriptions for the features which contain attributes from both. The idea is to create a third layer which is split up like the two existing ones and has the attributes from both.

So I want to merge both layers and the result layer should have all the nodes and all attributes.

what I am trying

marked as duplicate by Erik, whyzar, Jochen Schwarze, Andre Silva, Fran Raga Feb 28 at 12:27

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    There's a small typo that changes the meaning (and possible solutions) depending on how you meant it: "one of them ist exactly on top of the other." Should "ist" be changed to "is" or "isn't"? – csk Feb 25 at 16:36
  • They are stacked, the have the same locations but different nodes (it's cables and pipes with different lenghts) – KReisser Feb 26 at 6:40
  • 5
    Possible duplicate of How to create a label containing values from different layers in QGIS. What do you think, @JGH? =) – Taras Feb 26 at 6:44
  • It is the same topic but a different problem, the labelling is something I need to do if the stacking&merging doesn't work, but I need to find a solution for both – KReisser Feb 26 at 6:48
  • Sometimes people suggest duplicates where the question may not be a duplicate, but one of the answers is an answer to your question. Did you the virtual layer solution? IDK if you can convert a virtual layer to a permanent layer but it seems like that would totally answer your question. – csk Feb 26 at 20:34

Try producing a buffer around the segments of one feature. make it very small. then you will have to delete the intersection of the buffers. Afterwards cut the other feature with those buffers.

The transfer of the name information should be available as option in those tools.

  • yes they do only work in xy direction. but the problem you have is that lines are so thin that they will never exactly overlay. you will need a cutting feature that is bigger than a line or a point. thats why i propose generating a buffer-polygon. – Leo Feb 26 at 6:52
  • It worked on some of the segements. The network of lines I am working with is very complex , does this work for intersecting lines and more than 2? I created a buffer with 0,00001 degree and didn't know which tool to use for the deletion of the intersections of the buffers. – KReisser Feb 26 at 7:12
  • Try vector->geoprocessing->difference – Leo Feb 26 at 11:11

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