Select to view content in your preferred language

Calculate distance from A to B along a stream

268
4
Jump to solution
3 weeks ago
TrinityShuler02
New Contributor

Hello! 

I would like to know the best way to calculate the distance between two points along a stream. 

TrinityShuler02_0-1762812365926.png

The reddish line in the photo is the NHD flowline dataset. 

Imagine the black polygon is a point - how would I calculate the distance along the NHD flowline from the black polygon to the nearest pink diamond? Then, save that distance to the attributes of the black polygons in a "distance to nearest pink diamond" field?

None of the pink diamonds intersect with the NHD flowline, they are mostly within 300ft of the flowline. 

I found a possible solution on stack exchange: https://gis.stackexchange.com/questions/452347/how-to-measure-the-distance-between-two-points-in-the...

But I was wondering if there was a different way to do this. I've been looking into maybe a trace network or a network analysis deal, however I'm worried those may be too complicated for this specific task. 

 

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
AyanPalit
Esri Regular Contributor

@TrinityShuler02 

The stack exchange provides a basic way of getting the distances. However, you have to repeat the entire process for new sets of points -  black polygon and pink diamond. The same link also mentions linear referencing. 

The workflow is better handled through Linear Referencing ; it does need learning some new concepts and tools. 

You can get started with the following references:

  • Linear referencing datasets
  • NHD flowlines may be modelled as Routes with the Start/End locations as Calibration Points or simply update measures on the vertices based on geometry length.
  • You can then Locate Features Along Routes using NHD flowline as input route and the points as input features. You can provide search radius of 300 feet for the points that do not intersect the NHD routes.
  • The tool will generate a event table with the located measure of each point along the NHD route. You can then do a simple calculation to find the distance between specified points.
  • This method can be used to persist the measures on the NHD flowline routes. You can generate the event table by running Locate Features Along Routes for newer sets of points.
Ayan Palit | Principal Consultant Esri

View solution in original post

4 Replies
AyanPalit
Esri Regular Contributor

@TrinityShuler02 

The stack exchange provides a basic way of getting the distances. However, you have to repeat the entire process for new sets of points -  black polygon and pink diamond. The same link also mentions linear referencing. 

The workflow is better handled through Linear Referencing ; it does need learning some new concepts and tools. 

You can get started with the following references:

  • Linear referencing datasets
  • NHD flowlines may be modelled as Routes with the Start/End locations as Calibration Points or simply update measures on the vertices based on geometry length.
  • You can then Locate Features Along Routes using NHD flowline as input route and the points as input features. You can provide search radius of 300 feet for the points that do not intersect the NHD routes.
  • The tool will generate a event table with the located measure of each point along the NHD route. You can then do a simple calculation to find the distance between specified points.
  • This method can be used to persist the measures on the NHD flowline routes. You can generate the event table by running Locate Features Along Routes for newer sets of points.
Ayan Palit | Principal Consultant Esri
DuncanHornby
MVP Notable Contributor

You could use RivEX a tool for processing data specifically along river networks.

The basic work flow in RivEX would be: prepare the river network> snap your point data to the network and deal with any un-snapped data> link sites.

I provide many examples of workflows in the help file, your task matches this example.

The link site tool not only tells you the distance but gives you a polyline to visualise the route and use in further spatial analysis.

0 Kudos
TrinityShuler02
New Contributor

Thank you! This example does seem like the workflow I am needing to use, however the RivEX geoprocessing toolbox is locked behind a paywall that I cannot afford. They do offer a free download with pre-loaded data, but to use my own data I have to purchase a license. 

0 Kudos
DuncanHornby
MVP Notable Contributor

Yes its not free. I'm also the author behind the tool. You now have that decision to make; spend hours of your time teaching yourself trace networks or linear referencing (which is a good thing and expands your knowledge of GIS), rely on free support from this community platform or just spend £100\£200 pounds depending if you are academic or not and have a suite of tools tailored to your needs requiring probably no more than an hour of reading the help file to get yourself up and running.

If you think RivEX could help I recommend you download the demo version, have a play and get a sense of what its capable of doing.

0 Kudos