I want to add attributes from a polyline layer to a vector point layer.

The polyline is railway network. It has been divided into segments automatically, where as the attributes apply for each segment. To process the data further I had to convert the polyline into points. I wanted defined distances in between so I chose to use the plugin QChaninage. Now I got points in my defined distance. But in the attribute table there aren't any of the original attributes that where in the vectorlines table. How can I connect those attributes with my points?

I guess that vectorlines only store attributes at the end or beginning of these segments, but the point layer I created has points laying in between those segments.

I already tried to use tools from the toolbox (e.g Join attributes by location tool) but until now the attributes have been copied only to those points that are located exactly on the segment beginnings or endings of the original polyline.

I hope I am able to make my problem clear enough, if not please feel free to ask for further details. I am quite new to qgis.

edit: I also tried to intersect the original polyline with the attributes I want with my point layer but still only the segment beginnings and endings got the attributes I want, but not all the points.

  • 1
    Just allow for some uncertainty when you join attributes by location by setting the accuracy to something like 1 or 2 (map units). – Erik Mar 11 at 9:31
  • I would really like to try out your answer but I don't know where to set the accuracy. Could you maybe show me how your mask looks like and where to fill in the accuracy? – Jule kle Mar 11 at 9:52
  • 1
    If you're working with QGIS 3.x, you might have to buffer your points first. – Erik Mar 11 at 10:11
  • 1
    I've tried that and I am really glad it worked, thank you very much for your help. – Jule kle Mar 11 at 10:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.