Need to split a polyline into equal number arcobjects

06-15-2017 03:58 AM
New Contributor

I am faced with a problem. I need to split a polyline into equal number of parts using c# arcobjects where the user will enter the number of parts to split the polyline into.

I need to do this using arcobjects as I have a huge file. Does anyone have a solution?

0 Kudos
1 Reply
Esri Regular Contributor

There are a few ways you can do this.


The idea is you take a polyline, work out the split distance based on how many parts you need, then create a point down the line with ICurve.QueryPoint. Feed that point into the split. As this creates new features, you have to use the next split point to do a spatial search to find the underlying polyline it created, then keep iterating. (alternatively use IFeatureEdit2.SplitWithUpdate for the split)


This extracts portions of a polyline based on distance. Similar to above you have to first work out the distances with QueryPoint, but then create features with the extracted geometry (and attributes) and delete the original one.

0 Kudos