Python Script to construct points on a polyline

1138
1
07-17-2013 09:34 AM
BrendanQuigley
New Contributor II
Hi all,

I am looking for a simple python script that I can direct at a line shapefile and have it cycle through each line in the file while constructing points along each lines. The number of points required per line is a value in the attribute table. Points need to be evenly space with a point at the beginning and at the end of each line.

I have almost 5000 lines to cycle through with any where between 2 and 50+ points per line.

I am running arcgis 10.1.

Thanks
Tags (2)
0 Kudos
1 Reply
MathewCoyle
Frequent Contributor
Check out the positionAlongLine property of the polyline geometry object. You can use it by combining a search cursor on your line features to get the geometry and an insert cursor on your point features to write the points to.

resources.arcgis.com/en/help/main/10.1/index.html#/Polyline/018z00000008000000
0 Kudos