I am looking to generate points along a series of connected lines at regular intervals, but I wish to keep this interval even when a line is branching into 2 or 3 other lines. All the regular tools I tested in ArcMap or QGIS generate points on a feature basis meaning that the interval restart at each node.

On the picture I drew road network (blue lines), direction flow (orange arrows) and desired points (red dots). The first point is at 50m from the beginning of the first line, then a second 50m further but then there is a node within the next 50m. The usual tools would then start "fresh" on the two branches but I want to keep the 50m distance between the last point before the node and the first point on each branch. How could this be done? I suppose some topology may be needed...

Desired points along lines

I am looking for a free solution, ideally with Python, QGIS, SAGA, GRASS, GDAL or alike. In last resort, I could use ArcMap.


2 Answers 2


Calculate distance to outlet (using network analyst, maybe. I used networkx) for every node:

enter image description here

Transfer this info into links table:

enter image description here

Create routes - linear referencing:

arcpy.CreateRoutes_lr(in_line_features="LINKS", route_id_field="Route", out_feature_class="C:/SCRATCH/SCRATCH.gdb/ROUTES", measure_source="TWO_FIELDS", from_measure_field="From_T", to_measure_field="To_T", coordinate_priority="UPPER_LEFT", measure_factor="1", measure_offset="0", ignore_gaps="IGNORE", build_index="INDEX")

Note fields I used in above (!).

Create table like that in Excel to cover longest segment:

enter image description here

Add text field aLink to Routes, populate it by "A" and index that field. Use create query table to multiply records from Excel table:

arcpy.MakeQueryTable_management(in_table="ROUTES;fromExcel", out_table="QueryTable3", in_key_field_option="ADD_VIRTUAL_KEY_FIELD", in_key_field="", in_field="", where_clause="ROUTES.aLink = fromExcel.R")

and create event layer using Routes and extended table:

enter image description here

  • Thanks. I was able to do a similar thing with arcgis pro's network analyst. Using the "service area" feature, I set it to create lines (instead of the default polygons) and accumulate distance at the start/end points. I had to manually enter my list of breaks (10,20,...,200,210,...500,) as there is no "every X unit" ability. This created the lines in a feature class, and I could use the "vertex to points" tool to change the ending vertex of each line into a point. Mar 5, 2023 at 21:44

I suggest to use v.to.points (this will create points at a specified distance along your input lines in new vector map)

Note that the distance between generated points will be in map units.

  • It is not ArcGis (a) and how does it handle branching issue (b) ?
    – FelixIP
    Mar 21, 2019 at 3:45
  • 1
    I just tested GRASS v.to.points but it doesn't handle branching nor does it use a regular interval on all features, only within each feature. Mar 21, 2019 at 12:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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