Splitting a line

800
6
07-12-2011 02:05 AM
SebastianKrings
Occasional Contributor
Hello,

I want to split a line into many lines.
Every 500m I want to make a split.

I found this description for 9:
http://webhelp.esri.com/arcgisdesktop/9.2/index.cfm?TopicName=Splitting_line_features
and this for 10:
http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//002500000300000000

in 9's solution i can split it into only two parts or CREATE points along the line in equivalent distances
but i need a combination of both and performance is important, so I ant to solve it in one turn not in two

in 10's solution the line is also onloy splittet by points


an other solution could be to use this:
http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/into_an_equal_number_of_parts/001t0000...
I could read the lines lenght, divide it into approximately  500m pieces and split the line into the divide-count
but I cant find anything like this function in the sdk....

does anybody know a better and faster way?
thanks for ideas and help
0 Kudos
6 Replies
NeilClemmons
Regular Contributor III
Have you looked at IGeometryBridge2.SplitAtDistances or SplitDivideLength?
0 Kudos
SebastianKrings
Occasional Contributor
hey

thank you very much, this seems to be what I am looking for. SplitDivideLenth I think is the right of them. Because SplitAtDistances needs every Distance to split (I would have to insert many 500's)

I will try to implement it....

until this I have a furhter szenario in how to cut a line
I thought of using inregular distances to split. I found a function calling split on intersection.
http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/at_intersections/001t0000008s000000/
I want to use a contour line modell, which I generatet out of a raster dataset. Now every Intersection of my route with any contourline shall be a point to split. The intersection function had to be called several times to get any piece, thats no problem. At first I tried this without the SDK in the frontend of ArcMap. But there Im not able to select my contours. Another thought is that the contours consists of much lines, which are selectable seperately. So my question is, does it function to run the intersection function (or any equal method) with a line feature (my contours) as parameter?

Thanks for Help!
0 Kudos
SebastianKrings
Occasional Contributor
hey

may I illustrate my problem:

[ATTACH]7811[/ATTACH]


i want to split my route at any intersection with a contour layer (consisting of much contourlines as one feature) and get all route pieces back

Im looking for a solution in arcmap or programmatically for c# as add-in

thanks
0 Kudos
SebastianKrings
Occasional Contributor
I additionally found this:

http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#/Cut2_Method/002m000003tt...


that's what I want, just for polylines, too, instead of only polygons
Cut2 is now only available in polygons.



Or:
http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//002m000002p4000000
It seems that it is deviding a Line by a Polyline into a right and a left part.
What will happen if there are more then one cutting points?
0 Kudos
DubravkoAntonic
New Contributor III
IFeatureEdit.Split method looks more performance intensive then SplitAtDistance because after each split it stores new features, and deletes starting feature. And it looks to me you will call the Split function more then once for each Polyline.

Consider Neil advice and use IPolyline.SplitAtDistance. All operations are stored in local memory and you will store final features/geometries without continuous deleting in DB.

If you have large amount of long and complex features to process keep in mind that for complex feature Geometry at beginning of operation can take about 10Mb each. Just not to loose performance on memory paging and swap files.
0 Kudos
AriadnaP
New Contributor
HI!


Is there another way to split the WHOLE line by distance? By using the Editor - Split, it only splits the first segment, and I have to keep repeating the same process for the whole line.

For what I've read it seems I should download this IPolyline.SplitAtDistance tool? or the SplitAtLength. But how do I do that? these links only lead me to command steps but I would need to know how/where to download it and use it from ArcMap Interface...

Thank you for your help




Hello,

I want to split a line into many lines.
Every 500m I want to make a split.

I found this description for 9:
http://webhelp.esri.com/arcgisdesktop/9.2/index.cfm?TopicName=Splitting_line_features
and this for 10:
http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//002500000300000000

in 9's solution i can split it into only two parts or CREATE points along the line in equivalent distances
but i need a combination of both and performance is important, so I ant to solve it in one turn not in two

in 10's solution the line is also onloy splittet by points


an other solution could be to use this:
http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/into_an_equal_number_of_parts/001t0000...
I could read the lines lenght, divide it into approximately  500m pieces and split the line into the divide-count
but I cant find anything like this function in the sdk....

does anybody know a better and faster way?
thanks for ideas and help
0 Kudos