I have a polyline layer that has been joined to a table and I need to split it at certain distances along the line.

The attribute table contains the distances at which I would like to split the lines. The attribute table looks like this:Attribute Table

I need to split the line a two spots, ChStaL and ChStaR, which are both distances from the starting node.

I'd really like a python type solution if possible as I have over 30 of these layers.

I've been cruising around ESRI help docs and ArcToolbox but, haven't found anything that will allow me to do this en-mass. Almost everything out there requires me to do manually editing.

Any help would be most appreciated.

  • 1
    Which version of ArcGIS are you using? 10.1 has an improved geometry interface that would make this easy but I think it might be difficult in 10.0 and earlier. – blah238 Aug 27 '12 at 16:22
  • 3
    This sounds remarkably similar to gis.stackexchange.com/questions/8904 and gis.stackexchange.com/questions/19663, both of which might solve this problem. If not, search for more solutions to this frequent family of questions. – whuber Aug 27 '12 at 16:36
  • @whuber it is yes close to these questions, but still different. I reviewed them before and tried some solutions. – Cody Brown Aug 27 '12 at 17:17
  • @blah238 I have access to 10.1 and manually editing them isn't hard, but the amount of shapes I would have to manually edit makes this to massive of a task. – Cody Brown Aug 27 '12 at 17:18

In 10.1 you could use the new positionAlongLine function to generate the points you want to split by, and then use the Split Line at Point tool.

I don't have 10.1 installed to test with but you would basically do the following:

  1. Create a new empty point feature class
  2. Open a SearchCursor on your line feature class
  3. Open an InsertCursor on your point feature class
  4. For each line:
    1. Get a point using positionAlongLine with your first distance attribute (ChStaL)
    2. Get a point using positionAlongLine with your second distance attribute (ChStaR)
    3. Insert the two points into the point feature class
  5. Delete the cursor objects
  6. Use Split Line At Point to create a new line feature class with lines in the original line feature class split by the points in the now-populated point feature class.

Alternatively use linear referencing as mentioned in @Horbydd's answer.

| improve this answer | |
  • 1
    I must get hold of 10.1, sounds like ArcPy has been much improved and finally in the 21st Century! – Hornbydd Aug 27 '12 at 18:44

Assuming you have ArcInfo, one way you could achieve this without any python and all in model builder is this:

  1. Treat each polyline as a "route", so you need to create an unique numeric ID column.
  2. Convert your polyline layer into a polylineM featureclass and then calibrate it with the calibrate route geo-processing tool, the M value coming from the length of the polyline.
  3. Create a non-spatial table which has this "route ID" and your distance along field (ChStaL), you can do that by simply exporting the table and deleting the other fields.
  4. Run the locate features along route geo-processing tool on your polylineM layer and feed in the non-spatial table to create event points along the polylines.
  5. Export the event layer to a new point dataset.
  6. Repeat the above process but for your ChStaR field.
  7. Merge the 2 point layers into a single point layer
  8. Run the Split Line At Point geo-processing tool using the single point layer on your original line layer.
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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