<?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 Is there a performance difference between IHitTest and IProximityOperator? in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/is-there-a-performance-difference-between-ihittest/m-p/38740#M1020</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I came across some old code in our code base that first looks if a geometry/shape implements &lt;EM&gt;IHitTest&lt;/EM&gt;. If it does, it uses &lt;EM&gt;HitTest&lt;/EM&gt;(...) to determine the distance between the two geometries. If it does not implement &lt;EM&gt;IHitTest&lt;/EM&gt;, it uses &lt;EM&gt;IProximityOperator.ReturnDistance&lt;/EM&gt;(...).&lt;/P&gt;&lt;P&gt;Knowing that we are only interested in the distance between the two features/geometries, is there a recommendation as to which to use &lt;EM&gt;IHitTest&lt;/EM&gt; or &lt;EM&gt;IProximityOperator&lt;/EM&gt; ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Nov 2014 21:35:31 GMT</pubDate>
    <dc:creator>ericliprandi</dc:creator>
    <dc:date>2014-11-03T21:35:31Z</dc:date>
    <item>
      <title>Is there a performance difference between IHitTest and IProximityOperator?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/is-there-a-performance-difference-between-ihittest/m-p/38740#M1020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I came across some old code in our code base that first looks if a geometry/shape implements &lt;EM&gt;IHitTest&lt;/EM&gt;. If it does, it uses &lt;EM&gt;HitTest&lt;/EM&gt;(...) to determine the distance between the two geometries. If it does not implement &lt;EM&gt;IHitTest&lt;/EM&gt;, it uses &lt;EM&gt;IProximityOperator.ReturnDistance&lt;/EM&gt;(...).&lt;/P&gt;&lt;P&gt;Knowing that we are only interested in the distance between the two features/geometries, is there a recommendation as to which to use &lt;EM&gt;IHitTest&lt;/EM&gt; or &lt;EM&gt;IProximityOperator&lt;/EM&gt; ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Nov 2014 21:35:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/is-there-a-performance-difference-between-ihittest/m-p/38740#M1020</guid>
      <dc:creator>ericliprandi</dc:creator>
      <dc:date>2014-11-03T21:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a performance difference between IHitTest and IProximityOperator?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/is-there-a-performance-difference-between-ihittest/m-p/38741#M1021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Based strictly on the inputs and outputs of &lt;A href="http://resources.arcgis.com/en/help/arcobjects-net/componenthelp/index.html#//002m0000021w000000"&gt;IHitTest.HitTest&lt;/A&gt; vs. &lt;A href="http://resources.arcgis.com/en/help/arcobjects-net/componenthelp/index.html#//002m00000324000000"&gt;IProximityOperator.ReturnDistance&lt;/A&gt;, you could infer that HitTest is most likely a heavier call, but you can't know for certain without running some performance tests with your data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there anything else to the code that would explain the preference of HitTest over ReturnDistance, e.g. are the QueryPoint, searchRadius, or geometryPart parameters being used in ways that could produce different results compared to ReturnDistance?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Nov 2014 23:20:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/is-there-a-performance-difference-between-ihittest/m-p/38741#M1021</guid>
      <dc:creator>ErinBrimhall</dc:creator>
      <dc:date>2014-11-03T23:20:21Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a performance difference between IHitTest and IProximityOperator?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/is-there-a-performance-difference-between-ihittest/m-p/38742#M1022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Erin,&lt;/P&gt;&lt;P&gt;Thanks for the reply. From the &lt;EM&gt;HitTest&lt;/EM&gt;() call, only the return value (Boolean) and distance are actually used. So, I am fairly confident that's the only information we care about. I have a feeling someone had an idea to use some of the other information for something else but never got around to doing it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Nov 2014 23:53:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/is-there-a-performance-difference-between-ihittest/m-p/38742#M1022</guid>
      <dc:creator>ericliprandi</dc:creator>
      <dc:date>2014-11-03T23:53:47Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a performance difference between IHitTest and IProximityOperator?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/is-there-a-performance-difference-between-ihittest/m-p/38743#M1023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eric,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So long as the performance and results are at least as good or better, I would lean toward using the simpler ReturnDistance method if you are itching to change this code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd also be curious to learn what you find If you do end up comparing the performance of these two methods.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Nov 2014 16:19:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/is-there-a-performance-difference-between-ihittest/m-p/38743#M1023</guid>
      <dc:creator>ErinBrimhall</dc:creator>
      <dc:date>2014-11-04T16:19:09Z</dc:date>
    </item>
  </channel>
</rss>

