Creating points on a line

4216
3
06-24-2013 08:49 AM
CharlotteBerry
New Contributor
I need to create a series of points on a polyline.  My polyline has a start and end point and I have distances for points along that line that I need to plot.  My polyline is 250 m long and I have points with distances from 0-250m on the polyline.  The distances of the points are uneven from the start of the polyline.  Does anyone know how to do this or if there is a script to tell ARC to create points on a line based on the location?
Tags (2)
0 Kudos
3 Replies
RichardFairhurst
MVP Honored Contributor
I need to create a series of points on a polyline.  My polyline has a start and end point and I have distances for points along that line that I need to plot.  My polyline is 250 m long and I have points with distances from 0-250m on the polyline.  The distances of the points are uneven from the start of the polyline.  Does anyone know how to do this or if there is a script to tell ARC to create points on a line based on the location?


If the point locates all have to be inputted manually anyway, because they do not follow a standard pattern, then linear referencing seems the way to go.  Use the Create Route tool on your line to assign measures based on your line length.  Then create a table that contains one field for the line ID value (repeated for every record associated with that line) and a second double field for each measure location.  Right click the table and make it an Route Event Table.  If all the records were already entered they will plot on the line.  You could watch new records plot on the line as soon as both the Line ID and measure value are posted for e new record.  To insert a new location, just insert a new record with a Line ID and measure.  If the position data is in Excel, the spreadsheet may work directly as an Event table already as long as you add a column for the Line ID.

If it followed a simple pattern other methods would be more efficient, like repeating the split tool or some Python scripts.
0 Kudos
markdenil
Occasional Contributor III
You could build the route event table by first building a dictionary of a list of event measures keyed to the route ID.
format your existing list of irregular steps thusly:
eventDict = {
rt1: [10, 20, 30, 40],
rt2: [5, 7, 9],
rt3: [9, 99, 999]
}
Then use the dictionary to populate the event table (with an insert cursor) setting each event so
the route ID is set from the key and the measure set from each member of the list

route     measure
rt1        10
rt1        20
rt1        30
rt1        40
rt2         5
rt2         7
and so on...
Then apply the events to the routes, and convert to points.
0 Kudos
RhettZufelt
MVP Frequent Contributor
I need to create a series of points on a polyline.  My polyline has a start and end point and I have distances for points along that line that I need to plot.  My polyline is 250 m long and I have points with distances from 0-250m on the polyline.  The distances of the points are uneven from the start of the polyline.  Does anyone know how to do this or if there is a script to tell ARC to create points on a line based on the location?


Well, if it is along a single line with only two points, you could use the start point as your begining, then use Cosine to calculate the Oposite and Adjacent distances using your angle and length.

(startX + Adjacent), (startY + Opposite) would be the "new" point at your distance along the line.  Then, the only thing that changes is the distance, so just iterate it using same math, but with different length.

Could also create lines starting at start point in dist/direction, then get end verticies.

R_

This, of course is assuming you are after code.  In ArcMap, just start editing and add points (using Point at end of line Tool) with snapping on.  Snapping will start at the endpoint of your line, then right-click and select "Lenth", enter your lenth and it will "fix" it, then move until you snap back to the line and finish sketch.  Do this for each of your points and you are done.

Also in ArcMap, if your line has M values, can use construct points tool http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//001t00000029000000.htm.
0 Kudos