<?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 Avg Nearest Neighbor fails when called from Python Toolbox tool in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/avg-nearest-neighbor-fails-when-called-from-python/m-p/673218#M22369</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm integrating the Average Nearest Neighbor (ANN) tool into a custom Python Toolbox tool. When I run ANN from the default ArcToolbox dialog it works great. When I call the ANN tool via arcpy using the same input and parameters the tool fails; I get ERROR 000224 Cannot insert features. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem appears to be related to the fourth parameter, called "Area". I want to use the default, so I pass "#" as the fourth parameter like so:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;arcpy.AverageNearestNeighbor_stats("burglaries", "EUCLIDEAN_DISTANCE", "NO_REPORT", "#")&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...and the tool fails. But when I change the fourth parameter to some arbitrary number like so:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.AverageNearestNeighbor_stats("burglaries", "EUCLIDEAN_DISTANCE", "NO_REPORT", 50)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...it works. Any ideas on why this is happening? In both cases the input is a Query Layer. As I said, the default works just fine with the exact same data when I run the Average Nearest Neighbor tool on its own.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Apr 2014 16:43:37 GMT</pubDate>
    <dc:creator>RyanClancy</dc:creator>
    <dc:date>2014-04-14T16:43:37Z</dc:date>
    <item>
      <title>Avg Nearest Neighbor fails when called from Python Toolbox tool</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/avg-nearest-neighbor-fails-when-called-from-python/m-p/673218#M22369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm integrating the Average Nearest Neighbor (ANN) tool into a custom Python Toolbox tool. When I run ANN from the default ArcToolbox dialog it works great. When I call the ANN tool via arcpy using the same input and parameters the tool fails; I get ERROR 000224 Cannot insert features. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem appears to be related to the fourth parameter, called "Area". I want to use the default, so I pass "#" as the fourth parameter like so:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;arcpy.AverageNearestNeighbor_stats("burglaries", "EUCLIDEAN_DISTANCE", "NO_REPORT", "#")&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...and the tool fails. But when I change the fourth parameter to some arbitrary number like so:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.AverageNearestNeighbor_stats("burglaries", "EUCLIDEAN_DISTANCE", "NO_REPORT", 50)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...it works. Any ideas on why this is happening? In both cases the input is a Query Layer. As I said, the default works just fine with the exact same data when I run the Average Nearest Neighbor tool on its own.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2014 16:43:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/avg-nearest-neighbor-fails-when-called-from-python/m-p/673218#M22369</guid>
      <dc:creator>RyanClancy</dc:creator>
      <dc:date>2014-04-14T16:43:37Z</dc:date>
    </item>
  </channel>
</rss>

