<?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: While converting feature class to spatially enabled dataframe shape_length data is not populating ? in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/while-converting-feature-class-to-spatially/m-p/1324736#M8973</link>
    <description>&lt;P&gt;I am seeing this too. Looks like the SHAPE_LENGTH field does not come through with GDB feature classes, at least. The good news, however, is it's simple to re-calculate the Shape length field:&lt;/P&gt;&lt;PRE&gt;sedf["length"] = sedf["SHAPE"].apply(lambda x: x.get_length("PLANAR", "METERS"))&lt;/PRE&gt;&lt;P&gt;More information on &lt;STRONG&gt;get_length&lt;/STRONG&gt; options &lt;A href="https://developers.arcgis.com/python/api-reference/arcgis.features.html#arcgis.features.GeoSeriesAccessor.get_length" target="_self"&gt;here.&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 01 Sep 2023 13:52:55 GMT</pubDate>
    <dc:creator>EarlMedina</dc:creator>
    <dc:date>2023-09-01T13:52:55Z</dc:date>
    <item>
      <title>While converting feature class to spatially enabled dataframe shape_length data is not populating ?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/while-converting-feature-class-to-spatially/m-p/1324277#M8965</link>
      <description>&lt;P&gt;I am converting feature class to spatially enabled data frame using below code, after conversion shape_length field of a line layer is not getting populated. Only shape data is available ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;fc = os.path.join(geodatabase_path, layer_name)
sedf = arcgis.GeoAccessor.from_featureclass(fc)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 09:43:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/while-converting-feature-class-to-spatially/m-p/1324277#M8965</guid>
      <dc:creator>NiharSahoo</dc:creator>
      <dc:date>2023-08-31T09:43:22Z</dc:date>
    </item>
    <item>
      <title>Re: While converting feature class to spatially enabled dataframe shape_length data is not populating ?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/while-converting-feature-class-to-spatially/m-p/1324288#M8966</link>
      <description>&lt;P&gt;maybe a shapefile?&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 11:33:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/while-converting-feature-class-to-spatially/m-p/1324288#M8966</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2023-08-31T11:33:31Z</dc:date>
    </item>
    <item>
      <title>Re: While converting feature class to spatially enabled dataframe shape_length data is not populating ?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/while-converting-feature-class-to-spatially/m-p/1324289#M8967</link>
      <description>&lt;P&gt;Sorry i could understand. Can you please elaborate ?&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 11:41:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/while-converting-feature-class-to-spatially/m-p/1324289#M8967</guid>
      <dc:creator>NiharSahoo</dc:creator>
      <dc:date>2023-08-31T11:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: While converting feature class to spatially enabled dataframe shape_length data is not populating ?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/while-converting-feature-class-to-spatially/m-p/1324467#M8970</link>
      <description>&lt;P&gt;A shapefile might retain the shape_length field.&amp;nbsp; Shape_length and shape_area are maintained by featureclasses (eg in a gdb), but the code for&amp;nbsp;&lt;/P&gt;&lt;P&gt;arcgis.GeoAccessor.from_featureclass&lt;/P&gt;&lt;P&gt;may not maintain it.&amp;nbsp; Look at the code in your installation for&lt;/P&gt;&lt;P&gt;C:\... your install dir ...\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\features\geo\_io\fileops.py&lt;/P&gt;&lt;P&gt;lines 666-682.&amp;nbsp; If you are running in an environment that has arcpy installed it attempts to read the length and area field... If your environment doesn't have arcpy installed, it will fail to retrieve them.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 17:51:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/while-converting-feature-class-to-spatially/m-p/1324467#M8970</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2023-08-31T17:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: While converting feature class to spatially enabled dataframe shape_length data is not populating ?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/while-converting-feature-class-to-spatially/m-p/1324736#M8973</link>
      <description>&lt;P&gt;I am seeing this too. Looks like the SHAPE_LENGTH field does not come through with GDB feature classes, at least. The good news, however, is it's simple to re-calculate the Shape length field:&lt;/P&gt;&lt;PRE&gt;sedf["length"] = sedf["SHAPE"].apply(lambda x: x.get_length("PLANAR", "METERS"))&lt;/PRE&gt;&lt;P&gt;More information on &lt;STRONG&gt;get_length&lt;/STRONG&gt; options &lt;A href="https://developers.arcgis.com/python/api-reference/arcgis.features.html#arcgis.features.GeoSeriesAccessor.get_length" target="_self"&gt;here.&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Sep 2023 13:52:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/while-converting-feature-class-to-spatially/m-p/1324736#M8973</guid>
      <dc:creator>EarlMedina</dc:creator>
      <dc:date>2023-09-01T13:52:55Z</dc:date>
    </item>
  </channel>
</rss>

