-1

I need the start point value and endpoint value in the line geometry. I have been able to achieve the values using the script given here But it is giving me errors in a few cases and I do not know how to solve my case.

At some places, the point from where we need to start/end value is at a certain distance from the line (~ 0.5m or 0.3m). In such cases even after using Feature Vertices to Point (start and end vertices) and manually adding the start/end values, I am unable to get the correct result. It swaps the end value for the start value and vice versa. The start value and end value is required based on the direction/flow of the line.

One such example is below enter image description here

I have also tried using Feature Vertices to Points and then trying spatial join and then inner join based on buffer for such cases, but it is not yielding results.

Required result depiction is below: enter image description here

5
  • 1
    Is there a reason you added the QGIS tag?
    – Erik
    Mar 9 at 14:51
  • @FelixIP, I am unable to understand how do i make use of this link for my use case given I need a string in the start value and end value. That string is present in another point file which i am transferring to Feature Vertices to Points using Spatial Join and failing in cases where those points are at a certain distance
    – ashnaa1610
    Mar 10 at 4:44
  • I see, points don't coincide with start/end of line. So, extract lines' start points. Run Near between them and points. Start points will have fields ORIG_FID (of the line) and NEAR_FID (of the point). This is enough info to join by attribute. Repeat for end point.
    – FelixIP
    Mar 10 at 5:00
  • @FelixIP, I had tried a similar approach but instead of using Near, i was using Buffer to Spatial Join the values. This method was not working for me and giving lot of error in cases where the line is not directly connected to the point from which i need the value to be transferred to the line. In the image above, i need the point values which is in label to be transferred to both the lines, one which is touching the point and another which is not. but the start/end value will change as per the direction of the line.
    – ashnaa1610
    Mar 13 at 5:36

1 Answer 1

0

If this

enter image description here

IS what you want, do what I suggested in my second comment.

1
  • I have updated the question with the required results.
    – ashnaa1610
    Mar 13 at 10:41

Your Answer

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

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