1

I'm relatively new to QGIS and Python.

Starting with two layers, one containing polylines (streets) and one containing points. I'm trying to automate some labeling of points. Therefore I want to add a field containing an angle of the street where the point is situated. This angle already exists in my line-layer (segments). Now I want to join the data on condition that the street-name is the same. So that I can automate the labeling (parallel to the street).

closed as off-topic by mgri, PolyGeo May 6 '17 at 10:35

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking help to debug/write/improve code must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Providing a clear problem statement and evidence of a code attempt will help others to help you. See: How to create a Minimal, Complete, and Verifiable example." – mgri, PolyGeo
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Do you first want to find the closest line feature to the point and then evaluate if the names match, if both those conditions are True then update attribute from line to point? – artwork21 May 4 '17 at 12:39
  • @artwork21 - My initial thought was to first evaluate the lines where the names are equal and then checking which om them was closest, because i thought that would evaluate faster..? but if you have a solution using your suggested method, that is also perfect! – Geodir May 4 '17 at 12:59
  • Thanks for clarifying. This can definitely be done using pyqgis. For coding questions please provide your best coding attempt within your question and let us know where you are stuck. This forum does not provide end-to-end coding solutions without an attempt provided. – artwork21 May 4 '17 at 13:36