<?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 Finding polygons to left or right of line in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/finding-polygons-to-left-or-right-of-line/m-p/755732#M20041</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am playing around with some C# logic to spin line segments indicating if polygons are on the left or right of the line segment.&amp;nbsp; I am using ISpatialFilter and esriSpatialRelEnum.esriSpatialRelTouches relationship to find polygons that touch a line segment.&amp;nbsp; I have seen references to the HitTest method to determine left and right side of the relationship based on the bRightSide flag.&amp;nbsp; However, with my test layer of lines and polygons which looks like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Image1.jpg" class="jive-image image-1" src="https://community.esri.com/legacyfs/online/2979_Image1.jpg" style="width: 620px; height: 356px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Relative to the highlighted street segment, my program finds that it touches polygons A, B, and C but the polygons that I will be interested in are going to be A and C since they are the ones on the left and right of the line segment. B is just touch -- or in the case of a segment that is truly perpendicular to B -- so I would expect the bRightSide flag to be incorrect for HitTest in this case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions or a better solution?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Aug 2014 18:28:40 GMT</pubDate>
    <dc:creator>MarkParr</dc:creator>
    <dc:date>2014-08-04T18:28:40Z</dc:date>
    <item>
      <title>Finding polygons to left or right of line</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/finding-polygons-to-left-or-right-of-line/m-p/755732#M20041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am playing around with some C# logic to spin line segments indicating if polygons are on the left or right of the line segment.&amp;nbsp; I am using ISpatialFilter and esriSpatialRelEnum.esriSpatialRelTouches relationship to find polygons that touch a line segment.&amp;nbsp; I have seen references to the HitTest method to determine left and right side of the relationship based on the bRightSide flag.&amp;nbsp; However, with my test layer of lines and polygons which looks like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Image1.jpg" class="jive-image image-1" src="https://community.esri.com/legacyfs/online/2979_Image1.jpg" style="width: 620px; height: 356px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Relative to the highlighted street segment, my program finds that it touches polygons A, B, and C but the polygons that I will be interested in are going to be A and C since they are the ones on the left and right of the line segment. B is just touch -- or in the case of a segment that is truly perpendicular to B -- so I would expect the bRightSide flag to be incorrect for HitTest in this case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions or a better solution?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2014 18:28:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/finding-polygons-to-left-or-right-of-line/m-p/755732#M20041</guid>
      <dc:creator>MarkParr</dc:creator>
      <dc:date>2014-08-04T18:28:40Z</dc:date>
    </item>
    <item>
      <title>Re: Finding polygons to left or right of line</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/finding-polygons-to-left-or-right-of-line/m-p/755733#M20042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can think of two ways to do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create two points on either side of the line at its midpoint using the &lt;A href="http://resources.arcgis.com/en/help/arcobjects-net/componenthelp/index.html#//002m000000wv000000"&gt;IConstructPoint.ConstructOffset Method&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;With each point do the hittest to determine which side of the line it is then find the underlying polygon with a search query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The other method is to use topology. Programmatically create a topology graph around the line with the line and polygons. Get the topology edge the line belongs to then get the left and right polygons via the &lt;A href="http://resources.arcgis.com/en/help/arcobjects-net/componenthelp/index.html#//0025000009nw000000"&gt;ITopologyEdge methods &lt;/A&gt;(LeftParents, RightParents).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have a bunch of these to do I don't know which approach will be quicker but you're probably more familiar with the code in the first option.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Aug 2014 19:32:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/finding-polygons-to-left-or-right-of-line/m-p/755733#M20042</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-08-04T19:32:05Z</dc:date>
    </item>
    <item>
      <title>Re: Finding polygons to left or right of line</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/finding-polygons-to-left-or-right-of-line/m-p/755734#M20043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What you need is a spatial selection with SHARE_A_LINE_SEGMENT_WITH. If you are looking at doing this from C# then have a look at this discussion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://forums.esri.com/Thread.asp?c=93&amp;amp;f=993&amp;amp;t=222513" title="http://forums.esri.com/Thread.asp?c=93&amp;amp;f=993&amp;amp;t=222513"&gt;ISpatialFilter.SpatialRelDescription : share a line segment with&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Aug 2014 02:27:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/finding-polygons-to-left-or-right-of-line/m-p/755734#M20043</guid>
      <dc:creator>RiyasDeen</dc:creator>
      <dc:date>2014-08-05T02:27:24Z</dc:date>
    </item>
  </channel>
</rss>

