I have a line that has points evenly spaced on the line. The points are numbered in increasing order along the line. When I use Split Line at Points, my line segments are not ordered with the points. They are appear to be randomly ordered.
Is there someway to fix this? I need to at least have the lines numbered such that they are numbered in order so I can extract data to other programs.
If this isn't possible, is there a way to create an attribute for each line segment that is equal to the average of the points that are connected to each end of the line.
Thanks
I have a line that has points evenly spaced on the line. The points are numbered in increasing order along the line. When I use Split Line at Points, my line segments are not ordered with the points. They are appear to be randomly ordered.
Is there someway to fix this? I need to at least have the lines numbered such that they are numbered in order so I can extract data to other programs.
If this isn't possible, is there a way to create an attribute for each line segment that is equal to the average of the points that are connected to each end of the line.
Thanks
I think your best best will be to calculate the x,y values of your points on your lines. Then in Excel sort your points from low to high and whatever designates a particular line. Call them something like FromX and FromY
For example if it is line called XXY sort it Linename and then your sort.
at the end of cell create ToX and ToY
for the example.
LineName column A
Sort column B
FromX column C
FromY column D
ToX column E
ToY column F
in E2 (ToX first blank cell under the headers)
=if((A2=A3),C3,"")
This will say IF linename for point 1 is the same as point 2 then populate the ToX with the FromX of the 2nd point. If not leave it blank. You can then fill in the rest of the rows by dragging it down. If done correctly you should see blank values for ToX and ToY at all the end points. Fill in appropriately for ToY and drag it in.
Now save it as a .csv. this will write the values into the cells and remove the formulas. Then open it back up in excel and delete all the rows with no values in the ToX and ToY
Bring the spreadsheet into ArcGIS and use the XY to Line tool and it will build your polylines in correct sorted order and you can attribute them as you wish.
This does work. I had to create 65000 some spans between all of our transmission structures in our system in sequential order from Structure 1 to whatever on each different line.
Spatial Join the points to the lines with the lines as your primary target. Use the One to One option and get the average of the point IDs (modify the field list summary options for the point number field) assigned to the lines and then sort the lines according to the original line ID and the averaged Point IDs. Truncate the fractional portion if you wanted the numbers to match the point at the beginning of the line (assuming you have a point at the beginning). This assumes no points exist at the intersection of two or more lines. If that was possible I would apply the process iteratively for one line and matching point set at a time or use my second option.
I would alternatively use linear referencing for this. The Create Route tool can assign measures along the line in a way that matched the arrangement of your points. You would need points at each line end for this to work. Then I would use the Located Features Along Route tool to match up the points to the line in an event table. Then I would copy the event table, subtract 1 from each point number and merge the two tables. Then I would get the Summary Statistics with the unique case being for each Route ID and Point Number and get the Min and Max of the measures of the points. This creates a line table that can be Sorted by Point ID or Min or Max measure to sequence the way you want. Export the line events to actual lines if you need to.
I like the idea of the spatial join, and it seems like it should work really easily. But, for some reason, it isn't. I followed your directions, but the results either came out as null or there were 0s for everything.
Thanks