<?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: Using Point in Polygon in Modelbuilder in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/using-point-in-polygon-in-modelbuilder/m-p/716511#M23720</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I have been researching ways to count points in polygons and the obvious answer is to use Hawthe's Tools. I have downloaded it, and it works perfectly. My new ambitious task is to create a simple model to calculate some fields in an attribute table. I also want to put this point in polygon geoprocessing task as part of my model. Is there any way to do this? i.e. add the Hawthe tool into the model or is there another geoprocessing task that can handle this?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Mike&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm guess all of Hawth's tools are accessed from a point and click interface, not in a toolbox. In that case you're out of luck.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, you can count points in polygons by running the Identity tool and piping its output into the Summary Stastistics tool. You can then use Add Field and Add Join and Calculate Field to copy the counts to your table.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Feb 2011 21:19:20 GMT</pubDate>
    <dc:creator>curtvprice</dc:creator>
    <dc:date>2011-02-18T21:19:20Z</dc:date>
    <item>
      <title>Using Point in Polygon in Modelbuilder</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/using-point-in-polygon-in-modelbuilder/m-p/716510#M23719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have been researching ways to count points in polygons and the obvious answer is to use Hawthe's Tools. I have downloaded it, and it works perfectly. My new ambitious task is to create a simple model to calculate some fields in an attribute table. I also want to put this point in polygon geoprocessing task as part of my model. Is there any way to do this? i.e. add the Hawthe tool into the model or is there another geoprocessing task that can handle this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Feb 2011 02:29:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/using-point-in-polygon-in-modelbuilder/m-p/716510#M23719</guid>
      <dc:creator>MikeMacRae</dc:creator>
      <dc:date>2011-02-17T02:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: Using Point in Polygon in Modelbuilder</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/using-point-in-polygon-in-modelbuilder/m-p/716511#M23720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I have been researching ways to count points in polygons and the obvious answer is to use Hawthe's Tools. I have downloaded it, and it works perfectly. My new ambitious task is to create a simple model to calculate some fields in an attribute table. I also want to put this point in polygon geoprocessing task as part of my model. Is there any way to do this? i.e. add the Hawthe tool into the model or is there another geoprocessing task that can handle this?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Mike&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm guess all of Hawth's tools are accessed from a point and click interface, not in a toolbox. In that case you're out of luck.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, you can count points in polygons by running the Identity tool and piping its output into the Summary Stastistics tool. You can then use Add Field and Add Join and Calculate Field to copy the counts to your table.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Feb 2011 21:19:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/using-point-in-polygon-in-modelbuilder/m-p/716511#M23720</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2011-02-18T21:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: Using Point in Polygon in Modelbuilder</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/using-point-in-polygon-in-modelbuilder/m-p/716512#M23721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the response. I came up with a python script to do this. For those who are interested, it goes something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp; 

# Converts unselectable feature class into a selectable feature layer
gp.MakeFeatureLayer(POINT,"point")
gp.MakeFeatureLayer(POLYGON,"polygon")

rows = gp.SearchCursor("polygon")
row = rows.Next()

gp.AddMessage("Calculating Points in Polgons...")

# Loop through each row and count the points in each polygon record
while row:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Select each record inside of the polygon feature class&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SelPoly = gp.SelectLayerByAttribute("polygon", "NEW_SELECTION", "\"OBJECTID\" =" + str(row.OBJECTID))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #gp.AddMessage(row.OBJECTID)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Select all the point that are inside of the polygon record
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SelPts = gp.SelectLayerByLocation("point", "WITHIN", SelPoly, 0, "NEW_SELECTION")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Count the points that are in each polygon
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GetCount = gp.GetCount_management(SelPts)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Calculate the ASSOC_PTS field with the counted points
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.CalculateField_management("polygon", "ASSOC_PTS", GetCount, "VB", "")

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Move to the next row&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row = rows.Next()&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 06:41:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/using-point-in-polygon-in-modelbuilder/m-p/716512#M23721</guid>
      <dc:creator>MikeMacRae</dc:creator>
      <dc:date>2021-12-12T06:41:04Z</dc:date>
    </item>
  </channel>
</rss>

