<?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 Is there a way to use python get the geometries of the feature classes in sde? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/is-there-a-way-to-use-python-get-the-geometries-of/m-p/135510#M10619</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I am working on a script to automate a process for populating certain fields in several feature classes, but in order to do so I need to determine what kind of geometries these feature classes are. Depending on what kind of feature classes they are, the script runs a certain way. The issue I am having with the script is I am not getting the list of geometries for the feature classes. The feature classes are in sde (not sure if that makes a difference) and I keep getting a list, but not a list of the geometries. Any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy

arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;workspace &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;'Database Connections\Storm Water.sde\STORM.GISADMIN.Storm_Network'&lt;/SPAN&gt;

fcs &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
descList &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
fclist &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ListFeatureClasses&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; fc &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; fclist&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    fcs&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;append&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; fc &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; fcs&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    desc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Describe&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    descList&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;append&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;desc&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 07:33:36 GMT</pubDate>
    <dc:creator>RPGIS</dc:creator>
    <dc:date>2021-12-11T07:33:36Z</dc:date>
    <item>
      <title>Is there a way to use python get the geometries of the feature classes in sde?</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-to-use-python-get-the-geometries-of/m-p/135510#M10619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I am working on a script to automate a process for populating certain fields in several feature classes, but in order to do so I need to determine what kind of geometries these feature classes are. Depending on what kind of feature classes they are, the script runs a certain way. The issue I am having with the script is I am not getting the list of geometries for the feature classes. The feature classes are in sde (not sure if that makes a difference) and I keep getting a list, but not a list of the geometries. Any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy

arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;workspace &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;'Database Connections\Storm Water.sde\STORM.GISADMIN.Storm_Network'&lt;/SPAN&gt;

fcs &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
descList &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
fclist &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ListFeatureClasses&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; fc &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; fclist&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    fcs&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;append&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; fc &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; fcs&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    desc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Describe&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    descList&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;append&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;desc&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:33:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-to-use-python-get-the-geometries-of/m-p/135510#M10619</guid>
      <dc:creator>RPGIS</dc:creator>
      <dc:date>2021-12-11T07:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to use python get the geometries of the feature classes in sde?</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-to-use-python-get-the-geometries-of/m-p/135511#M10620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks like a combination of the&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/arcpy/functions/describe.htm"&gt;https://pro.arcgis.com/en/pro-app/arcpy/functions/describe.htm&lt;/A&gt;&amp;nbsp;&amp;amp;&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/arcpy/functions/featureclass-properties.htm"&gt;https://pro.arcgis.com/en/pro-app/arcpy/functions/featureclass-properties.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN class="" style="color: #aa0d91;"&gt;import&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt; arcpy&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #006a00;"&gt;# Create a Describe object from the feature class&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #006a00;"&gt;#&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;desc = arcpy.Describe(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #c41a16;"&gt;"C:/data/arch.dgn/Point"&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #006a00;"&gt;# Print some feature class properties&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #006a00;"&gt;#&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;print(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #c41a16;"&gt;"Feature Type: "&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt; + desc.featureType)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;print(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #c41a16;"&gt;"Shape Type : "&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt; + desc.shapeType)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;print(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #c41a16;"&gt;"Spatial Index: "&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt; + str(desc.hasSpatialIndex))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Oct 2019 14:16:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-to-use-python-get-the-geometries-of/m-p/135511#M10620</guid>
      <dc:creator>George_Thompson</dc:creator>
      <dc:date>2019-10-01T14:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to use python get the geometries of the feature classes in sde?</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-to-use-python-get-the-geometries-of/m-p/135512#M10621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are on the right track.&amp;nbsp; The code snippet you provided is created a list of Describe objects.&amp;nbsp; What you need to do is lookup the shapeType property of the object to determine what type of geometry object is stored in the feature class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try:&lt;/P&gt;&lt;PRE class=""&gt;&lt;CODE&gt;descList&lt;SPAN class=""&gt;.&lt;/SPAN&gt;append&lt;SPAN class=""&gt;(&lt;/SPAN&gt;desc&lt;SPAN class=""&gt;.shapeType)&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Oct 2019 14:20:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-to-use-python-get-the-geometries-of/m-p/135512#M10621</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2019-10-01T14:20:56Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to use python get the geometries of the feature classes in sde?</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-to-use-python-get-the-geometries-of/m-p/135513#M10622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Josh and George.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to automate several different tasks and the reason I was trying to determine the geometries of the feature classes is to run a different scenario depending on the type of geometry exists. I haven't worked with sde databases much and I have automated several tasks in the past before but not to this degree.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, I have a mixture of feature classes where the feature classes exist both in a database and dataset. I tried researching different options to extract the names of the feature classes but for some reason I get either a partial name or a partial path. Is there a way to specifically get the name of the feature class given the full path of the feature class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Oct 2019 14:21:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-to-use-python-get-the-geometries-of/m-p/135513#M10622</guid>
      <dc:creator>RPGIS</dc:creator>
      <dc:date>2019-10-02T14:21:50Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to use python get the geometries of the feature classes in sde?</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-to-use-python-get-the-geometries-of/m-p/135514#M10623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the examples shown for&amp;nbsp;&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/10.3/analyze/arcpy-data-access/walk.htm" title="http://desktop.arcgis.com/en/arcmap/10.3/analyze/arcpy-data-access/walk.htm"&gt;Walk—Help | ArcGIS for Desktop&lt;/A&gt;&amp;nbsp;will get you what you need in terms of full paths. From there, you can use either the name or baseName property of your describe object:&amp;nbsp;&lt;A class="link-titled" href="https://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-functions/describe-object-properties.htm" title="https://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-functions/describe-object-properties.htm"&gt;Describe object properties—Help | ArcGIS Desktop&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Micah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Oct 2019 14:28:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-to-use-python-get-the-geometries-of/m-p/135514#M10623</guid>
      <dc:creator>MicahBabinski</dc:creator>
      <dc:date>2019-10-02T14:28:01Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to use python get the geometries of the feature classes in sde?</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-to-use-python-get-the-geometries-of/m-p/135515#M10624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Micah,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had some issues with the overall path names since I had feature classes in both the database and the dataset within the database. I was able to figure out a solution but it was kind of lengthy. I tried to shorthand it but that didn't turn out to well. Here is the solution I came up with when I had the full path names. If there is a better way to shorthand this I would definitely be interested.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; os

workspace &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;'Database Connections\Connection to dcp-gisapp1tst.sde'&lt;/SPAN&gt;
fcs &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;

walk &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;da&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Walk&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;workspace&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; datatype&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"FeatureClass"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; dirpath&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; dirnames&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; filenames &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; walk&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; filename &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; filenames&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        fcs&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;append&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;dirpath&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; filename&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        
&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; fc &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; fcs&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    geometryType &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Describe&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;shapeType
    fcsname &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;basename&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    name &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;splitext&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fcsname&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    x &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; geometryType
    y &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; name&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;lstrip&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'.'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'{} is a {}'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;y&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; x&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:33:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-to-use-python-get-the-geometries-of/m-p/135515#M10624</guid>
      <dc:creator>RPGIS</dc:creator>
      <dc:date>2021-12-11T07:33:38Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to use python get the geometries of the feature classes in sde?</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-to-use-python-get-the-geometries-of/m-p/135516#M10625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The important thing is that it works for what you need it to do. Your script looks good to me. Are you just trying to write it in fewer lines so you have a shorter script? It would be possible to accomplish what you are doing in the 'for' loop at line 13 in the 'for' loop before that one, but there's nothing wrong with the way you've done it!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you just want to write it in fewer lines, you could do this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; os

workspace &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;'Database Connections\Connection to dcp-gisapp1tst.sde'&lt;/SPAN&gt;

walk &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;da&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Walk&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;workspace&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; datatype&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"FeatureClass"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; dirpath&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; dirnames&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; filenames &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; walk&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; filename &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; filenames&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        fc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;dirpath&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; filename&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"{} is a {}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;split&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"."&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Describe&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;shapeType&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Micah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:33:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-to-use-python-get-the-geometries-of/m-p/135516#M10625</guid>
      <dc:creator>MicahBabinski</dc:creator>
      <dc:date>2021-12-11T07:33:41Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to use python get the geometries of the feature classes in sde?</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-to-use-python-get-the-geometries-of/m-p/135517#M10626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See &lt;A href="https://community.esri.com/migrated-users/36357"&gt;Micah Babinski&lt;/A&gt;‌'s reply.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Oct 2019 21:02:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-to-use-python-get-the-geometries-of/m-p/135517#M10626</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2019-10-02T21:02:52Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to use python get the geometries of the feature classes in sde?</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-to-use-python-get-the-geometries-of/m-p/135518#M10627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Micah,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was trying to figure out if there are ways to write the same thing with fewer lines. The script worked for what I needed but I wasn't sure if there was a way to write it in a simpler fashion. I know writing a simpler script is not as important as a working script, but knowing that there are ways to simplify what I have already done would make searching through the code a little easier(and streamlined).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help Micah,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Oct 2019 21:40:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-to-use-python-get-the-geometries-of/m-p/135518#M10627</guid>
      <dc:creator>RPGIS</dc:creator>
      <dc:date>2019-10-02T21:40:59Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to use python get the geometries of the feature classes in sde?</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-to-use-python-get-the-geometries-of/m-p/135519#M10628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Totally - I get it. I applaud your efforts to simplify your code - it's easier to understand, maintain, and all around better that way.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Oct 2019 21:47:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-to-use-python-get-the-geometries-of/m-p/135519#M10628</guid>
      <dc:creator>MicahBabinski</dc:creator>
      <dc:date>2019-10-02T21:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to use python get the geometries of the feature classes in sde?</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-to-use-python-get-the-geometries-of/m-p/135520#M10629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yours is much clearer and easier to dissect should something should go wrong.... compare to&lt;/P&gt;&lt;P&gt;a more compact version and you will see&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; fc &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; fcs&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    shp_type &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Describe&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;shapeType
    name &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;splitext&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;basename&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;lstrip&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'.'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'{} is a {}'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;name&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; shp_type&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# ---- or.... for python 3.6 +&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; fc &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; fcs&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    shp_type &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Describe&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;shapeType
    name &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;splitext&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;basename&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;lstrip&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'.'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;f&lt;SPAN class="string token"&gt;'{name} is a {shp_type}'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:33:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-to-use-python-get-the-geometries-of/m-p/135520#M10629</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-11T07:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to use python get the geometries of the feature classes in sde?</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-to-use-python-get-the-geometries-of/m-p/135521#M10630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Dan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I never really thought about that. I simply thought a script that is written with fewer lines looks aesthetically better, but never considered troubleshooting as a factor in writing the script.&amp;nbsp;&lt;SPAN&gt;I am relatively new to this and I see people write these in so many ways, but&amp;nbsp;they oddly function the same.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the thing that I am unsure about is if there is a particular method to writing scripts, or is that simply dependent on personal preference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Oct 2019 13:19:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-to-use-python-get-the-geometries-of/m-p/135521#M10630</guid>
      <dc:creator>RPGIS</dc:creator>
      <dc:date>2019-10-03T13:19:37Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to use python get the geometries of the feature classes in sde?</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-to-use-python-get-the-geometries-of/m-p/135522#M10631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;a script that is written with fewer lines looks aesthetically better&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I think readability is a bit more objective of a measure than aesthetics.&amp;nbsp; At some point streamlining or reducing lines of code becomes code golf, fun to play but seldom the best approach for portability, maintenance, etc....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Oct 2019 13:39:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-to-use-python-get-the-geometries-of/m-p/135522#M10631</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2019-10-03T13:39:52Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to use python get the geometries of the feature classes in sde?</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-to-use-python-get-the-geometries-of/m-p/135523#M10632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I really love where this thread has gone, especially since we all have to read code as well as write code. From my conversations with other professionals, a lot of people start out their GIS Python scripting journey by reading and modifying existing code to fix bugs, change variables, add tools, etc. Personally, I took a class in 2012 and more or less dove in. I made lots of mistakes along the way, and continue to do so! Referring to the example I gave to Robert:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;fc&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;split&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"."&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is something I have typed many,&amp;nbsp;&lt;EM&gt;many&lt;/EM&gt; times, so placing it inside the format function makes sense to me. But Dan's example is indeed more readable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyways, folks might find this resource useful: &lt;A href="https://www.python.org/dev/peps/pep-0008/"&gt;Style Guide for Python Code&lt;/A&gt; by Guido van Rossum et al. Lots of good practical guidelines as well as philosophy. I googled 'Python Best Practices' after checking this thread this morning so I am going to check it out myself.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Oct 2019 14:21:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-to-use-python-get-the-geometries-of/m-p/135523#M10632</guid>
      <dc:creator>MicahBabinski</dc:creator>
      <dc:date>2019-10-03T14:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to use python get the geometries of the feature classes in sde?</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-to-use-python-get-the-geometries-of/m-p/135524#M10633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah I wasn't sure the best way to put it. At what point does reducing the lines of code become constraining. I don't code a whole lot but I think knowing the do's and don'ts for reducing lines of code may definitely help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So when is it best to reduce lines of code and when is it not. I would like to know just in case so I don't make the mistake or doing it too much to where troubleshooting the script may turn into a hassle.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Oct 2019 15:07:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-to-use-python-get-the-geometries-of/m-p/135524#M10633</guid>
      <dc:creator>RPGIS</dc:creator>
      <dc:date>2019-10-03T15:07:07Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to use python get the geometries of the feature classes in sde?</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-to-use-python-get-the-geometries-of/m-p/135525#M10634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately Robert, there is no hard fast rule.&amp;nbsp; As Micah pointed out in an earlier response, what seems natural in terms of compactness might seem too dense for someone else.&amp;nbsp; For me, personally, I have learned over time by setting code aside and revisiting it a while later.&amp;nbsp; If I read code that I wrote a few weeks or months ago, and I need to really pause and think hard about what a line or loop is doing, then I likely went too far in condensing the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Honestly, for now, I wouldn't worry to much about writing compact and/or beautiful code, just focus on learning the language, especially being idiomatic.&amp;nbsp; For me the ugliest Python code is code structure that people bring over from their understanding of other languages but don't bother to rewrite it to be "Pythonic."&amp;nbsp; Several good examples are shown in Ned Batchelder's 2013 PyCon presentation:&amp;nbsp; &lt;A class="link-titled" href="https://nedbatchelder.com/text/iter.html" title="https://nedbatchelder.com/text/iter.html"&gt;Ned Batchelder: Loop Like A Native&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, someone might take a C or JavaScript approach to looping over a list:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;for i in range(len(my_list)):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; v = my_list&lt;I&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print(v)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;while it can be done much simpler in Python:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;for v in my_list:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print(v)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Oct 2019 16:22:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-to-use-python-get-the-geometries-of/m-p/135525#M10634</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2019-10-03T16:22:01Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to use python get the geometries of the feature classes in sde?</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-to-use-python-get-the-geometries-of/m-p/135526#M10635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Joshua,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was just curious since I wasn't sure if there was a particular way in which code is written. I am slowly getting the hang of it and so far the scripts are working, but the direction might need some more clarity. I talked with one of my coworkers who suggested to create a diagram of&amp;nbsp;what you would like to accomplish, and from that diagram write the code that corresponds with each step in the diagram. That has worked for me so far, but I also noticed that ( due to the limited experience with python ) I tend to lengthen my coding a bit. The code works but in some areas I would like to figure out where I can simplify the structuring just a bit, especially if the code is designed to accomplish something simple.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Oct 2019 16:37:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-to-use-python-get-the-geometries-of/m-p/135526#M10635</guid>
      <dc:creator>RPGIS</dc:creator>
      <dc:date>2019-10-03T16:37:49Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to use python get the geometries of the feature classes in sde?</title>
      <link>https://community.esri.com/t5/python-questions/is-there-a-way-to-use-python-get-the-geometries-of/m-p/135527#M10636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you have specific code snippets that you think can be simplified, I am sure the GeoNet community can share some thoughts.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Oct 2019 19:30:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/is-there-a-way-to-use-python-get-the-geometries-of/m-p/135527#M10636</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2019-10-03T19:30:00Z</dc:date>
    </item>
  </channel>
</rss>

