# Generate points along line starting at the END of a line?

86
1
03-20-2023 08:07 AM
New Contributor

I'm trying to generate points upstream from the polygon. I can't find any documentation anywhere or solutions on how to generate points from the end of the line. I think the start of my line is at the bottom of the photo, so it's getting to the polygon and randomly putting a point at what ends up being 45 meters from the polygon. In this example, I'm looking to go 188 meters upstream from that polygon. My line is one segment.

I need to do this in python script. I'm writing code to automate finding the river length of my polygon so I can create an upstream and downstream reach that is the length of that polygon. This works fine on the other side (downstream) of the polygon because the start of that line is upstream and it moves downstream...

Is there ANY documentation to switch the start and end vertices of a line? Or to generate points from the end of a line? I've tried to simply generate at -188 meters, but my entire program freezes when I try that. I've tried to use math to force it to place a point at 188 meters from the end, but I can't get that to work.

My only solution right now is to get the length of that line (233 meters), subtract my target length from it (233-188 = 45), generate points every one meter, and then extract the point where ID == 45. Is this really the best option? Can we get an option to generate points from the end of the line?