<?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 How to use the NEAR Class: the basics ? in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-use-the-near-class-the-basics/m-p/267073#M6870</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;(This post was sent in the geoprocessing forum, but I moved it here)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using the Java SDK in Eclipse.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to determine the distance between a point (in a first shapefile) and the nearest point amongs a set of many points (in a second shapefile). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For this purpose, I use the Near Class, but my simple code contain an error (see below). The shapefiles that I use have successfully been used in the Buffer Class in another code, so it seems that I dont use the NEAR class correctly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would appreciate if you could explain how the NEAR class should be used.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using these lines of code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//// Java code begins here&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;// Create a Near object, with both input shapefiles in the constructor &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Near near = new Near("D:\\myPosition.shp","D:\\myManyPositions.shp");&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;// Create a geoprocessor and execute the Near object&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GeoProcessor gp = new GeoProcessor();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IGeoProcessorResult result1 = gp.execute(near, null);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//// Java code ends here&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 30 Mar 2013 20:36:34 GMT</pubDate>
    <dc:creator>EricPlante</dc:creator>
    <dc:date>2013-03-30T20:36:34Z</dc:date>
    <item>
      <title>How to use the NEAR Class: the basics ?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-use-the-near-class-the-basics/m-p/267073#M6870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;(This post was sent in the geoprocessing forum, but I moved it here)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using the Java SDK in Eclipse.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to determine the distance between a point (in a first shapefile) and the nearest point amongs a set of many points (in a second shapefile). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For this purpose, I use the Near Class, but my simple code contain an error (see below). The shapefiles that I use have successfully been used in the Buffer Class in another code, so it seems that I dont use the NEAR class correctly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would appreciate if you could explain how the NEAR class should be used.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using these lines of code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//// Java code begins here&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;// Create a Near object, with both input shapefiles in the constructor &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Near near = new Near("D:\\myPosition.shp","D:\\myManyPositions.shp");&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;// Create a geoprocessor and execute the Near object&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GeoProcessor gp = new GeoProcessor();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IGeoProcessorResult result1 = gp.execute(near, null);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//// Java code ends here&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Mar 2013 20:36:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-use-the-near-class-the-basics/m-p/267073#M6870</guid>
      <dc:creator>EricPlante</dc:creator>
      <dc:date>2013-03-30T20:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the NEAR Class: the basics ?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-use-the-near-class-the-basics/m-p/267074#M6871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Your question looks like it relates to ArcObjects (ArcGIS Engine?) and not the Runtime SDK for Java SE which is a new product from ESRI which has been written from the ground up and contains no ArcObjects...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sprry your post keeps on needing to be moved, but I'll forward it to the ArcObjects forum and you will get a better answer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Good luck&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mark&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 31 Mar 2013 14:32:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-use-the-near-class-the-basics/m-p/267074#M6871</guid>
      <dc:creator>MarkBaird</dc:creator>
      <dc:date>2013-03-31T14:32:55Z</dc:date>
    </item>
  </channel>
</rss>

