<?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: Finding the nearest feature to reference point in a target layer in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/finding-the-nearest-feature-to-reference-point-in/m-p/578996#M15634</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can use IIndexQuery2.NearestFeature for this.&amp;nbsp; The method will return the ObjectId of the nearest feature as well as its distance from the input geometry.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Oct 2013 14:30:37 GMT</pubDate>
    <dc:creator>NeilClemmons</dc:creator>
    <dc:date>2013-10-28T14:30:37Z</dc:date>
    <item>
      <title>Finding the nearest feature to reference point in a target layer</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/finding-the-nearest-feature-to-reference-point-in/m-p/578995#M15633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've been searching the forums for the past few days and trying out different solutions but somehow can't work this one out. I'm in the middle of coding up a macro that automates a number of functions we have and need to find a way of doing the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a point feature selected and want to find the nearest feature of a different layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Essentially it's writing the code of a private function such as "GetNearestPoint(RefFeature as IFeature, TargetLayer as ILayer, pMap as IMap).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However the TargetLayer that applies in my case has literally millions of entries and there is no way I can write code that goes through all of them. Also I'm running ArcMap through Citrix so performance is an issue. Any suggestions?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Oct 2013 14:19:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/finding-the-nearest-feature-to-reference-point-in/m-p/578995#M15633</guid>
      <dc:creator>FilipeEstacio</dc:creator>
      <dc:date>2013-10-28T14:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the nearest feature to reference point in a target layer</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/finding-the-nearest-feature-to-reference-point-in/m-p/578996#M15634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can use IIndexQuery2.NearestFeature for this.&amp;nbsp; The method will return the ObjectId of the nearest feature as well as its distance from the input geometry.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Oct 2013 14:30:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/finding-the-nearest-feature-to-reference-point-in/m-p/578996#M15634</guid>
      <dc:creator>NeilClemmons</dc:creator>
      <dc:date>2013-10-28T14:30:37Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the nearest feature to reference point in a target layer</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/finding-the-nearest-feature-to-reference-point-in/m-p/578997#M15635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the quick reply, Neil.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I had found the IIndexQuery2.NearestFeature but wasn't able to work out how to implement it. Do you happen to have a snippet of code that illustrates this?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Oct 2013 14:36:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/finding-the-nearest-feature-to-reference-point-in/m-p/578997#M15635</guid>
      <dc:creator>FilipeEstacio</dc:creator>
      <dc:date>2013-10-28T14:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the nearest feature to reference point in a target layer</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/finding-the-nearest-feature-to-reference-point-in/m-p/578998#M15636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;IIndexQuery is implemented by the FeatureIndex class.&amp;nbsp; This class also implements IFeatureIndex.&amp;nbsp; Use IFeatureIndex to set the feature class and build the index.&amp;nbsp; You can also use a feature cursor to build the index if you need to reduce the number of features being indexed.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Oct 2013 14:47:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/finding-the-nearest-feature-to-reference-point-in/m-p/578998#M15636</guid>
      <dc:creator>NeilClemmons</dc:creator>
      <dc:date>2013-10-28T14:47:04Z</dc:date>
    </item>
  </channel>
</rss>

