For ArcMap 10.1, is there a tool that will add only one vertex (node) a set distance from the first vertex, or alternatively, a set distance from the last vertex for multiple polylines?

The original vertices need to be retained for each polyline.

I have over 500 polylines and creating vertices individually in an edit session is taking forever!

  • 1
    Would Densify help? It will add vertices every x units, but I don't think it'll stop at just one so may not entirely suit your needs. Note this modifies your data, it doesn't create a separate output
    – Midavalo
    Commented Sep 15, 2016 at 19:02
  • Perhaps you are thinking instead of "extending" the line to add another vertex/endpoint. I think a picture will make your question clearer.
    – PolyGeo
    Commented Sep 15, 2016 at 19:18
  • Only need to add a vertex within a polyline, not extend it or change its length.
    – R Gonzalez
    Commented Sep 15, 2016 at 19:30
  • 1
    How do you decide whether to place the vertex that set distance from the start vs the end or are you wanting both? Please keep clarifying via an edit to your question because potential answerers do not always have time to read comment trails.
    – PolyGeo
    Commented Sep 15, 2016 at 20:13

1 Answer 1

  1. Create a copy of your lines
  2. Run add geometry attributes on it, part count and length
  3. Select ones with length > limit and part_Count=1
  4. Open table, select field Shape, pick field calculator, parser Python, advanced

Use expression below:

def insertV(dist,shp):
 newP=shp.positionAlongLine (dist).firstPoint
 for i in range(m):
  p=part.getObject(i); L=shp.measureOnLine(p)
  if L>dist:
   if n==1:arr.add(newP)
 return arcpy.Polyline(arr)


insertV(100, !Shape! )

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.