Select to view content in your preferred language

vb.net arcobjects intersect 2 polyline layers

2103
3
10-13-2014 09:50 PM
WuYang
by
Emerging Contributor

Dear all,

I want to intersect 2 polyline layers using vb.net arcobjects. Previously I called intersect geoprocessing tool, but I find it is too slow.

Is there a way to intersect several layers without using the gp tool?

I am using arcmap and arcobjects 10.2.2, in vb.net arcmap addin.

Thanks for attention.

0 Kudos
3 Replies
ModyBuchbinder
Esri Regular Contributor

Hi

The
basic command is ITopologicalOperator.Intersect

It
is working between to polylines in memory.

In
order to intersect two layers you must read the lines one by one and try to
find an intersect line on the other layer.

For
each polyline in layer1 you must select all intersect polylines in layer2
(maybe just boundary intersect) and then try to intersect them to get the geometry.

It
is not simple to write a program that will work quick and I am not sure if it
will be much quicker than the GP tool unless you have some information about
the two layers that can save some work.

Have
Fun

Mody

0 Kudos
WuYang
by
Emerging Contributor

Thanks a lot Mody,

You mention ITopologicalOperator.Intersect working between to polylines in memory. In my case, the polylines are from aarcsde database. Is it also applicable?

Thanks.

0 Kudos
ModyBuchbinder
Esri Regular Contributor

Hi

You must open a cursor and get them from the feature class.

Mody

0 Kudos