<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Polygon - line intersection problem in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/polygon-line-intersection-problem/m-p/530569#M14313</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try the following steps in your code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1.&amp;nbsp; I don't know where the data source for the input donut polygon, so before you call Simplify, set the property IsKnownSimple to false.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2.&amp;nbsp; The 0 dimensional output for intersection call is of MultiPoint type, instead of Point type.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Jun 2013 15:47:37 GMT</pubDate>
    <dc:creator>WeifengHe</dc:creator>
    <dc:date>2013-06-04T15:47:37Z</dc:date>
    <item>
      <title>Polygon - line intersection problem</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/polygon-line-intersection-problem/m-p/530568#M14312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am facing a problem when trying to find intersection points between a donut like polygon and a line using ITopologicalOperator.Intersect method: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
&amp;nbsp;&amp;nbsp; // The polygon has already been casted to ITopologicalOperator4 outside the method
&amp;nbsp;&amp;nbsp; private static IPointCollection5 ComputeIntersectionPoints(ITopologicalOperator4 topologialOperator, ILine normalLine) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; object obj = Type.Missing;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ISegmentCollection segCollection = new PolylineClass() as ISegmentCollection;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; segCollection.AddSegment((ISegment)normalLine, ref obj, ref obj);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IGeometry resultingGeometry = segCollection as IGeometry;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; topologialOperator.Simplify();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var intersectionPoints = topologialOperator.Intersect(resultingGeometry, esriGeometryDimension.esriGeometry0Dimension);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return intersectionPoints.IsEmpty ? new Point() as IPointCollection5 : (IPointCollection5)intersectionPoints;
&amp;nbsp;&amp;nbsp; }
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am receiving a successful intersection (intersection point) on the other boundary of the polygon but I do not get a hit on the interior border (the result of topologialOperator.Intersect(...) is always null). I have attached a sketch showing the situation. The line starts within the polygon and crosses either the exterior or interior border.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone can tell me why I do not get the second intersection point. Any help would be very much appreciated! Thank you very much!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jun 2013 08:30:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/polygon-line-intersection-problem/m-p/530568#M14312</guid>
      <dc:creator>ThomasLaue</dc:creator>
      <dc:date>2013-06-04T08:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: Polygon - line intersection problem</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/polygon-line-intersection-problem/m-p/530569#M14313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try the following steps in your code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1.&amp;nbsp; I don't know where the data source for the input donut polygon, so before you call Simplify, set the property IsKnownSimple to false.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2.&amp;nbsp; The 0 dimensional output for intersection call is of MultiPoint type, instead of Point type.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jun 2013 15:47:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/polygon-line-intersection-problem/m-p/530569#M14313</guid>
      <dc:creator>WeifengHe</dc:creator>
      <dc:date>2013-06-04T15:47:37Z</dc:date>
    </item>
    <item>
      <title>Re: Polygon - line intersection problem</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/polygon-line-intersection-problem/m-p/530570#M14314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thank you very much for your answer. Unfortunately, setting the "IsKnownSimple" property to "false" does&amp;nbsp; solve this problem. The return type is implicitly set to "MultiPoint" and works quite well for other intersection tasks. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone has another idea?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jun 2013 07:17:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/polygon-line-intersection-problem/m-p/530570#M14314</guid>
      <dc:creator>ThomasLaue</dc:creator>
      <dc:date>2013-06-10T07:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: Polygon - line intersection problem</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/polygon-line-intersection-problem/m-p/530571#M14315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thomas,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Are you using 10.1? Are these lines horizontal or vertical? If so it may be related to this &lt;/SPAN&gt;&lt;A href="http://support.esri.com/en/bugs/nimbus/TklNMDgyNjY4"&gt;bug&lt;/A&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;introduced&lt;/SPAN&gt;&lt;SPAN&gt; by ESRI in 10.1.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Duncan&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;p.s. You should always state your version of ArcGIS as it helps us help you.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jun 2013 20:37:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/polygon-line-intersection-problem/m-p/530571#M14315</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2013-06-10T20:37:23Z</dc:date>
    </item>
    <item>
      <title>Re: Polygon - line intersection problem</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/polygon-line-intersection-problem/m-p/530572#M14316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am using ArcObjects 10.0 and these lines are not necessarily vertical or horizontal so that I am assuming that my problem is not related to this specific bug.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jun 2013 06:32:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/polygon-line-intersection-problem/m-p/530572#M14316</guid>
      <dc:creator>ThomasLaue</dc:creator>
      <dc:date>2013-06-11T06:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: Polygon - line intersection problem</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/polygon-line-intersection-problem/m-p/530573#M14317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The bug Duncan mentioned only applies to Polyline/Polyline intersection.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I just verfied that intersection works with donut-like polygon.&amp;nbsp; Can you please check the output after you set IsKnownSimple = falase and Simplify?&amp;nbsp; Is this one still with an interior ring?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jun 2013 18:20:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/polygon-line-intersection-problem/m-p/530573#M14317</guid>
      <dc:creator>WeifengHe</dc:creator>
      <dc:date>2013-06-11T18:20:02Z</dc:date>
    </item>
  </channel>
</rss>

