Get the distance of an existing point on a line

This is similar to generating chainage along a line, in the sense that it is the exact opposite. Instead of creating point coordinates along a line feature using a known distance, I want to determine the distance an existing point coordinate is from the start point of a line feature, along that line feature.

To Python!

This marks the first time I’m embedding a Gist in WordPress since I’m busy moving all my stuff there. The idea for this script has been percolating in my head for a few months but I could never get it quite right. Now I’m glad it has come together, based off an idea sparked by this GeoNet thread.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s