<?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 ArcObjects spatial query using IRelationalOperator in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/arcobjects-spatial-query-using-irelationaloperator/m-p/674044#M18056</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to write a C# ArcObjects code to do the following:&lt;/P&gt;&lt;P&gt;1) draw a polygon around an area and store that area values in a field in a polygon feature class e.g. polygon X&lt;/P&gt;&lt;P&gt;2) within the polygon X, do a spatial query using TWO source feature classes i.e. source A and source B&lt;/P&gt;&lt;P&gt;3) source A feature class has identical fields as source B feature class, but the records contained in them are different&lt;/P&gt;&lt;P&gt;4) source A feature class and source B feature class usually have overlapping polygons, hence why spatial query is necessary to identify the overlap area and store this value in another field in polygon X.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to do a spatial query based on two sources and one target layer?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is not possible using "select by location" tool in ArcMap, but can ArcObject IRelationalOperator interface do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the examples I have seen so far only shows query between a target layer and a source layer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks for your feed backs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Sep 2014 22:48:07 GMT</pubDate>
    <dc:creator>DamolaMoronkeji</dc:creator>
    <dc:date>2014-09-03T22:48:07Z</dc:date>
    <item>
      <title>ArcObjects spatial query using IRelationalOperator</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/arcobjects-spatial-query-using-irelationaloperator/m-p/674044#M18056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to write a C# ArcObjects code to do the following:&lt;/P&gt;&lt;P&gt;1) draw a polygon around an area and store that area values in a field in a polygon feature class e.g. polygon X&lt;/P&gt;&lt;P&gt;2) within the polygon X, do a spatial query using TWO source feature classes i.e. source A and source B&lt;/P&gt;&lt;P&gt;3) source A feature class has identical fields as source B feature class, but the records contained in them are different&lt;/P&gt;&lt;P&gt;4) source A feature class and source B feature class usually have overlapping polygons, hence why spatial query is necessary to identify the overlap area and store this value in another field in polygon X.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to do a spatial query based on two sources and one target layer?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is not possible using "select by location" tool in ArcMap, but can ArcObject IRelationalOperator interface do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the examples I have seen so far only shows query between a target layer and a source layer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks for your feed backs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 22:48:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/arcobjects-spatial-query-using-irelationaloperator/m-p/674044#M18056</guid>
      <dc:creator>DamolaMoronkeji</dc:creator>
      <dc:date>2014-09-03T22:48:07Z</dc:date>
    </item>
    <item>
      <title>Re: ArcObjects spatial query using IRelationalOperator</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/arcobjects-spatial-query-using-irelationaloperator/m-p/674045#M18057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK so you've drawn polygon X, in this example polygons A and B overlap&amp;nbsp; and polygon X overlaps these, so which takes precedence? Do you take the information from A or B? If you say the top one then that is dictated by the draw order which I understand is simply the row order in the FeatureClass.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The interface &lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;IRelationalOperator compares individual geometries rather than whole layers. As your A and B layer polygons occupy the same space a spatial query will always return both but it would be a layer at a time, so there is no tool that will query 2 sources simultaneously.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;I think the bigger problem is how do you decide to choose A over B or vice versa?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2014 09:16:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/arcobjects-spatial-query-using-irelationaloperator/m-p/674045#M18057</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2014-09-04T09:16:24Z</dc:date>
    </item>
    <item>
      <title>Re: ArcObjects spatial query using IRelationalOperator</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/arcobjects-spatial-query-using-irelationaloperator/m-p/674046#M18058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a million Duncan for your answer. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each time I run the code, it only favours polygon A, which seats on top of polygon B. So it's not even possible to use polygon B to return any values from the spatial query but only returns zero all the time. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just needed to hear it from someone as I thought I was going crazy. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been having sleepless nights over this lol. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2014 09:29:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/arcobjects-spatial-query-using-irelationaloperator/m-p/674046#M18058</guid>
      <dc:creator>DamolaMoronkeji</dc:creator>
      <dc:date>2014-09-04T09:29:16Z</dc:date>
    </item>
  </channel>
</rss>

