Select to view content in your preferred language

Delete part of feature

1134
3
09-23-2016 06:24 AM
RavinHasseea
Emerging Contributor

Hi I am looking to create a routine to remove part of a polyline, in particular 1m from each end of the polyline. 

Is using IPolycurve.SplitAtDistance the best way to do this.

0 Kudos
3 Replies
by Anonymous User
Not applicable

Ravin,

Take a look at ICurve.GetSubcurve. Extract the portion you want and post that geometry back to the feature.

0 Kudos
RavinHasseea
Emerging Contributor

Hi,

Thanks for the reply. However in some cases, I will need to split the line feature a number of places where it intersects other line features as below. Any ideas?

0 Kudos
by Anonymous User
Not applicable

For those cases you can find the intersect locations as points with ITopologicalOperator.Intersect.

 Then use the points to either:

Find the distance along the line the intersection point occurs with ICurve.QueryPointAndDistance then use getsubcurve to extract it, or

use IFeatureEdit2.SplitWithUpdate to just split the line with the intersection point.

0 Kudos