<?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: How to get number of features in shapefile from python? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-to-get-number-of-features-in-shapefile-from/m-p/48491#M3850</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi James - I believe what you are looking for is called Get Count.&amp;nbsp; It will return the number of records found in the attribute table of a feature class, table or raster.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//0017000000n7000000.htm"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//0017000000n7000000.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't have access to Python at the moment otherwise I would have attached a Python script for you but if you need any further help just let me know.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 31 Jan 2011 01:48:44 GMT</pubDate>
    <dc:creator>MatthewNordhagen</dc:creator>
    <dc:date>2011-01-31T01:48:44Z</dc:date>
    <item>
      <title>How to get number of features in shapefile from python?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-get-number-of-features-in-shapefile-from/m-p/48490#M3849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi. I've been messing around with the python command window.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can't figure out which property will tell me how many features are in my shapefile.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;points = 'C:\ArcGIS_Tutorial\Vectormap\points.shp'&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I looked at arcpy.describe but it's not what I am after.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I can figure out how many features are in a shapefile, or how many datasets in a folder etc, it will be easy to create some for routines to process each one.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But until I find that property I am a bit stumped. Any tips on how to retrieve the answer in Python?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I know the answer is 10,000 from the attribute table - I created a 100 by 100 grid of regular points in a shapefile using Hawth's Tools. But I want to get that info programatically.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Jan 2011 23:17:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-get-number-of-features-in-shapefile-from/m-p/48490#M3849</guid>
      <dc:creator>JamesBattle</dc:creator>
      <dc:date>2011-01-30T23:17:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to get number of features in shapefile from python?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-get-number-of-features-in-shapefile-from/m-p/48491#M3850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi James - I believe what you are looking for is called Get Count.&amp;nbsp; It will return the number of records found in the attribute table of a feature class, table or raster.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//0017000000n7000000.htm"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//0017000000n7000000.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't have access to Python at the moment otherwise I would have attached a Python script for you but if you need any further help just let me know.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Jan 2011 01:48:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-get-number-of-features-in-shapefile-from/m-p/48491#M3850</guid>
      <dc:creator>MatthewNordhagen</dc:creator>
      <dc:date>2011-01-31T01:48:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to get number of features in shapefile from python?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-get-number-of-features-in-shapefile-from/m-p/48492#M3851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Perfect answer. Thank you!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was confused because it's a table tool, but I guess feature classes have tables so that's why it works here.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt; arcpy.GetCount_management(points)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;Result '10000'&amp;gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Jan 2011 08:45:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-get-number-of-features-in-shapefile-from/m-p/48492#M3851</guid>
      <dc:creator>JamesBattle</dc:creator>
      <dc:date>2011-01-31T08:45:47Z</dc:date>
    </item>
  </channel>
</rss>

