<?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: row.shape for layer ? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/row-shape-for-layer/m-p/263554#M20337</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Chris,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your answer. It seems to work but the problem is that after I used&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;partcount =feat.PartCount # Count the number of points in the current multipart feature&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and I get this message :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;AttributeError: 'int' object has no attribute 'PartCount'&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That means that the feat objet I get is not the same 'shape' ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Oct 2011 15:34:09 GMT</pubDate>
    <dc:creator>OlivierOlivier</dc:creator>
    <dc:date>2011-10-25T15:34:09Z</dc:date>
    <item>
      <title>row.shape for layer ?</title>
      <link>https://community.esri.com/t5/python-questions/row-shape-for-layer/m-p/263552#M20335</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;Can someone be so kind to explain why when I use those&amp;nbsp; lines&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;rows = gp.SearchCursor(infc)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;row = rows.Next()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;feat=row.shape&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;it works when infc is a shapefile but not when it's a layer ? In this case, I get "Field shape does not exist" even if it exists when I open attributes in ArcView.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks very much, sorry for a such basic question,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Olivier&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2011 11:06:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/row-shape-for-layer/m-p/263552#M20335</guid>
      <dc:creator>OlivierOlivier</dc:creator>
      <dc:date>2011-10-25T11:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: row.shape for layer ?</title>
      <link>https://community.esri.com/t5/python-questions/row-shape-for-layer/m-p/263553#M20336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The 'shape' field isn't always called shape...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;dsc = gp.describe(infc) #or your featurelayer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;rows = gp.SearchCursor(infc)&amp;nbsp; #or your featurelayer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;row = rows.Next()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;feat=row.getvalue(dsc.oidFieldName)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2011 15:15:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/row-shape-for-layer/m-p/263553#M20336</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2011-10-25T15:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: row.shape for layer ?</title>
      <link>https://community.esri.com/t5/python-questions/row-shape-for-layer/m-p/263554#M20337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Chris,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your answer. It seems to work but the problem is that after I used&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;partcount =feat.PartCount # Count the number of points in the current multipart feature&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and I get this message :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;AttributeError: 'int' object has no attribute 'PartCount'&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That means that the feat objet I get is not the same 'shape' ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2011 15:34:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/row-shape-for-layer/m-p/263554#M20337</guid>
      <dc:creator>OlivierOlivier</dc:creator>
      <dc:date>2011-10-25T15:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: row.shape for layer ?</title>
      <link>https://community.esri.com/t5/python-questions/row-shape-for-layer/m-p/263555#M20338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try shapeFieldName instead of oidFieldName.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2011 15:53:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/row-shape-for-layer/m-p/263555#M20338</guid>
      <dc:creator>LoganPugh</dc:creator>
      <dc:date>2011-10-25T15:53:11Z</dc:date>
    </item>
    <item>
      <title>Re: row.shape for layer ?</title>
      <link>https://community.esri.com/t5/python-questions/row-shape-for-layer/m-p/263556#M20339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That's ok. Sorry for being stupid, OidFieldName sounded strange to me but I didn't thank further.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks very much for your help Chris !&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Olivier&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2011 16:00:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/row-shape-for-layer/m-p/263556#M20339</guid>
      <dc:creator>OlivierOlivier</dc:creator>
      <dc:date>2011-10-25T16:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: row.shape for layer ?</title>
      <link>https://community.esri.com/t5/python-questions/row-shape-for-layer/m-p/263557#M20340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Woops - Thanks Logan...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, I meant shapeFieldName, not oidFieldName (although oidFieldName is quite usefull sometimes as well).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I didn't have my coffe yet...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2011 16:41:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/row-shape-for-layer/m-p/263557#M20340</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2011-10-25T16:41:03Z</dc:date>
    </item>
    <item>
      <title>Re: row.shape for layer ?</title>
      <link>https://community.esri.com/t5/python-questions/row-shape-for-layer/m-p/263558#M20341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I didn't get my coffee too, I thought previous answer was Chris's, sorry Logan.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks to both of you, you helped much !&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Olivier&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2011 16:49:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/row-shape-for-layer/m-p/263558#M20341</guid>
      <dc:creator>OlivierOlivier</dc:creator>
      <dc:date>2011-10-25T16:49:07Z</dc:date>
    </item>
  </channel>
</rss>

