<?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 Reading and Writing Feature Class in a File Geodatabase Using Geopandas in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/reading-and-writing-feature-class-in-a-file/m-p/1255003#M66795</link>
    <description>&lt;P&gt;I am able to read and write shapefiles in ArcGIS Pro using geopandas, but it would be more useful to read and write within a geodatabase.&amp;nbsp; When I try to read a feature class in a file geodatabase, I get the following driver error:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;DriverIOError&lt;/SPAN&gt;: Attempt to create csv layer (file) against a non-directory datasource.&lt;/PRE&gt;&lt;P&gt;When I try to write a geodataframe as a feature class, I get the following error:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;No such file or directory&lt;/PRE&gt;&lt;P&gt;I am wondering what I'm doing wrong... Please see my script below:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;file =&amp;nbsp;outGDB + '\FC_Name'&lt;/P&gt;&lt;P&gt;FC_gdf = gp.read_file(file, driver = 'FileGDB'))&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FC_gdf = gp.to_file(file, driver = 'FileGDB')&lt;/P&gt;&lt;P&gt;Thanks for your help!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 03 Feb 2023 19:51:30 GMT</pubDate>
    <dc:creator>tzz_12</dc:creator>
    <dc:date>2023-02-03T19:51:30Z</dc:date>
    <item>
      <title>Reading and Writing Feature Class in a File Geodatabase Using Geopandas</title>
      <link>https://community.esri.com/t5/python-questions/reading-and-writing-feature-class-in-a-file/m-p/1255003#M66795</link>
      <description>&lt;P&gt;I am able to read and write shapefiles in ArcGIS Pro using geopandas, but it would be more useful to read and write within a geodatabase.&amp;nbsp; When I try to read a feature class in a file geodatabase, I get the following driver error:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;DriverIOError&lt;/SPAN&gt;: Attempt to create csv layer (file) against a non-directory datasource.&lt;/PRE&gt;&lt;P&gt;When I try to write a geodataframe as a feature class, I get the following error:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;No such file or directory&lt;/PRE&gt;&lt;P&gt;I am wondering what I'm doing wrong... Please see my script below:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;file =&amp;nbsp;outGDB + '\FC_Name'&lt;/P&gt;&lt;P&gt;FC_gdf = gp.read_file(file, driver = 'FileGDB'))&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FC_gdf = gp.to_file(file, driver = 'FileGDB')&lt;/P&gt;&lt;P&gt;Thanks for your help!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 19:51:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/reading-and-writing-feature-class-in-a-file/m-p/1255003#M66795</guid>
      <dc:creator>tzz_12</dc:creator>
      <dc:date>2023-02-03T19:51:30Z</dc:date>
    </item>
    <item>
      <title>Re: Reading and Writing Feature Class in a File Geodatabase Using Geopandas</title>
      <link>https://community.esri.com/t5/python-questions/reading-and-writing-feature-class-in-a-file/m-p/1255009#M66796</link>
      <description>&lt;P&gt;I think this is an issue with having the FileGeodatabase drivers in a place that gdal / fiona can find it. Those two libraries are the backend for GeoPandas. You can get this setup, but it can be a pain to get it all working. For example:&amp;nbsp;&lt;A href="https://gis.stackexchange.com/questions/378890/adding-support-to-esris-filegdb-driver-when-fiona-gdal-osgeo-were-installed-thr" target="_blank"&gt;https://gis.stackexchange.com/questions/378890/adding-support-to-esris-filegdb-driver-when-fiona-gdal-osgeo-were-installed-thr&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Some other info:&amp;nbsp;&lt;A href="https://gdal.org/drivers/vector/filegdb.html#vector-filegdb" target="_blank"&gt;https://gdal.org/drivers/vector/filegdb.html#vector-filegdb&lt;/A&gt;&lt;/P&gt;&lt;P&gt;An alternative is to use the ArcGIS API for python and read and write a spatially enabled DataFrame. GeoPandas is better in a lot of ways, but SEDF generally works well with File Geodatabases and an ArcGIS Pro license:&amp;nbsp;&lt;A href="https://developers.arcgis.com/python/guide/part2-data-io-reading-data/" target="_blank"&gt;https://developers.arcgis.com/python/guide/part2-data-io-reading-data/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 20:01:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/reading-and-writing-feature-class-in-a-file/m-p/1255009#M66796</guid>
      <dc:creator>dslamb2022</dc:creator>
      <dc:date>2023-02-03T20:01:49Z</dc:date>
    </item>
    <item>
      <title>Re: Reading and Writing Feature Class in a File Geodatabase Using Geopandas</title>
      <link>https://community.esri.com/t5/python-questions/reading-and-writing-feature-class-in-a-file/m-p/1538128#M72822</link>
      <description>&lt;P&gt;I ran into this issue today and after sleuthing around, it looks like we are not providing the first parameters correctly in the geopandas.read_file() method. In the case of a geodatabase feature class as the path, you need to enter just the &lt;EM&gt;geodatabase&lt;/EM&gt;&lt;STRONG&gt; as the path parameter&lt;/STRONG&gt; and point to a particular &lt;EM&gt;feature class&lt;/EM&gt; using the &lt;STRONG&gt;layer parameter.&lt;/STRONG&gt; i.e.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;gdf = geopandas.read_file(r"C:\MyGeodatabase.gdb", layer="FeatureClassName", driver='OpenFileGDB')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This works fine for me. The only issue I can't seem to solve is to point at a feature class buried in a feature dataset.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Dec 2024 16:49:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/reading-and-writing-feature-class-in-a-file/m-p/1538128#M72822</guid>
      <dc:creator>MikeMacRae</dc:creator>
      <dc:date>2024-12-23T16:49:46Z</dc:date>
    </item>
  </channel>
</rss>

