<?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 list files in a personal geodatabse in Pro. in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-to-list-files-in-a-personal-geodatabse-in-pro/m-p/1249588#M66593</link>
    <description>&lt;P&gt;Actually, they included support with Pro. They did not make it easy. I won't speculate on why.&lt;/P&gt;&lt;P&gt;Look for ogr2ogr.py on your computer. On mine it is in "C:/Program Files/ArcGIS/Pro/bin/Python/envs/arcgispro-py3/Lib/site-packages/osgeo_utils/samples". That program is the swiss army knife of file conversions.&lt;/P&gt;&lt;P&gt;See if your computer has the personal geodatabase support in it. Activate a conda environment and run python, for example&lt;/P&gt;&lt;LI-CODE lang="c"&gt;conda activate arcgispro-py3
cd "C:/Program Files/ArcGIS/Pro/bin/Python/envs/arcgispro-py3/Lib/site-packages/osgeo_utils/samples"
python ogrinfo.py --formats
.
.
My system lists 77 supported formats here. The ESRI ones listed are

  ESRI Shapefile -vector- (rw+v): ESRI Shapefile
  ESRIJSON -vector- (rov): ESRIJSON
  PGeo -vector- (ro): ESRI Personal GeoDatabase
  OpenFileGDB -vector- (rov): ESRI FileGDB&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The ones you are interested in are the two database formats. Personal and FileGDB.&lt;/P&gt;&lt;P&gt;Older versions of GDAL (of which OGR is a member) support only reading FileGDB. Unfortunately that's what Esri gives you (see the "(rov)" which sadly means read-only.&lt;/P&gt;&lt;P&gt;You can read all details on the PGDB driver here: &lt;A href="https://gdal.org/drivers/vector/pgeo.html" target="_blank"&gt;https://gdal.org/drivers/vector/pgeo.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The FGDB information is here: &lt;A href="https://gdal.org/drivers/vector/openfilegdb.html" target="_blank"&gt;https://gdal.org/drivers/vector/openfilegdb.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If you want to be able to READ a PGDB and then WRITE to a FGDB you can update your copy of GDAL. It's probably incompatible with arcpy. But so what!! You have conda. You could do something like this&lt;/P&gt;&lt;LI-CODE lang="c"&gt;conda create --name=gdal python gdal
conda activate gdal
ogrinfo --version&lt;/LI-CODE&gt;&lt;P&gt;Now you have gdal version 3.6 installed,&amp;nbsp; and also it installs ALL the commands for you not just the Python libraries. So you can directly run commands without having to load Python. (Like "ogrinfo --version" instead of "python ogrinfo.py --version")&lt;/P&gt;&lt;P&gt;If you run "ogrinfo --formats" again you will see " OpenFileGDB -vector- (rw+v): ESRI FileGDB" which means you now have a tool that can translate PGDB to FGDB and it took you about 3 minutes to install it. And it's free. (I won't speculate why Esri does not included it with Pro since it's free?)&lt;/P&gt;&lt;P&gt;The ogrinfo tool should be able to list the contents of a PGDB. I don't have one!!&lt;/P&gt;&lt;P&gt;Here is an example of running it on a FGDB.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;ogrinfo TaxMaps.gdb
INFO: Open of `TaxMaps.gdb'
      using driver `OpenFileGDB' successful.
Layer: taxmap_anno (Multi Polygon)
Layer: seemap_anno (Multi Polygon)
Layer: bearing_anno (Multi Polygon)
Layer: taxlot_anno (Multi Polygon)
Layer: taxcode_anno (Multi Polygon)
Layer: PLSS (Multi Polygon)
Layer: Taxlots (Multi Polygon)
Layer: bearing_anno_aoi (Multi Polygon)
Layer: taxlot_anno_aoi (Multi Polygon)
Layer: Mapindex (Multi Polygon)
Layer: Reference_Lines (Multi Line String)
Layer: Taxlots_WM (Multi Polygon)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once I know all the layers in the database, I can get details on one layer,&lt;/P&gt;&lt;LI-CODE lang="c"&gt;ogrinfo TaxMaps.gdb PLSS
INFO: Open of `TaxMaps.gdb'
      using driver `OpenFileGDB' successful.

Layer name: PLSS
Geometry: Multi Polygon
Feature Count: 1
Extent: (7351565.172900, 930222.284121) - (7357078.350066, 935707.477034)
Layer SRS WKT:
PROJCRS["NAD83(HARN) / Oregon North (ft)",
    BASEGEOGCRS["NAD83(HARN)",
        DATUM["NAD83 (High Accuracy Reference Network)",
            ELLIPSOID["GRS 1980",6378137,298.257222101,
                LENGTHUNIT["metre",1]]],
        PRIMEM["Greenwich",0,
            ANGLEUNIT["degree",0.0174532925199433]],
        ID["EPSG",4152]],
    CONVERSION["SPCS83 Oregon North zone (International feet)",
        METHOD["Lambert Conic Conformal (2SP)",

... and it goes on and on listing everything ...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now that I know I can read a file geodatabase and I can get a list of layers, I can translate.&lt;/P&gt;&lt;P&gt;As I said above I DON'T HAVE ANY PGEO databases so I can't test it for you. In your case you would READ the PGEO and WRITE to whatever -- shapefile? UGH... I'd try going to a FGDB myself. This is just a test&lt;/P&gt;&lt;P&gt;Note the names are reversed, destination is first then source,&lt;/P&gt;&lt;LI-CODE lang="c"&gt;ogr2ogr -f "GeoJSON" plss.json TaxMaps.gdb PLSS

Note I have to give it the name of the layer (PLSS) in the FGDB as part of the source. This feature class has only one polygon in it, so I can dump the whole file here, 

ogrinfo plss.json PLSS
INFO: Open of `plss.json'
      using driver `GeoJSON' successful.

Layer name: PLSS
Geometry: Multi Polygon
Feature Count: 1
Extent: (7351565.172900, 930222.284121) - (7357078.350066, 935707.477034)
Layer SRS WKT:
PROJCRS["NAD83(HARN) / Oregon North (ft)",
    BASEGEOGCRS["NAD83(HARN)",
        DATUM["NAD83 (High Accuracy Reference Network)",
            ELLIPSOID["GRS 1980",6378137,298.257222101,
                LENGTHUNIT["metre",1]]],
        PRIMEM["Greenwich",0,
            ANGLEUNIT["degree",0.0174532925199433]],
        ID["EPSG",4152]],
    CONVERSION["SPCS83 Oregon North zone (International feet)",
        METHOD["Lambert Conic Conformal (2SP)",
            ID["EPSG",9802]],
        PARAMETER["Latitude of false origin",43.6666666666667,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8821]],
        PARAMETER["Longitude of false origin",-120.5,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8822]],
        PARAMETER["Latitude of 1st standard parallel",46,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8823]],
        PARAMETER["Latitude of 2nd standard parallel",44.3333333333333,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8824]],
        PARAMETER["Easting at false origin",8202099.738,
            LENGTHUNIT["foot",0.3048],
            ID["EPSG",8826]],
        PARAMETER["Northing at false origin",0,
            LENGTHUNIT["foot",0.3048],
            ID["EPSG",8827]]],
    CS[Cartesian,2],
        AXIS["easting (X)",east,
            ORDER[1],
            LENGTHUNIT["foot",0.3048]],
        AXIS["northing (Y)",north,
            ORDER[2],
            LENGTHUNIT["foot",0.3048]],
    USAGE[
        SCOPE["Engineering survey, topographic mapping."],
        AREA["United States (USA) - Oregon - counties of Baker; Benton; Clackamas; Clatsop; Columbia; Gilliam; Grant; Hood River; Jefferson; Lincoln; Linn; Marion; Morrow; Multnomah; Polk; Sherman; Tillamook; Umatilla; Union; Wallowa; Wasco; Washington; Wheeler; Yamhill."],
        BBOX[43.95,-124.17,46.26,-116.47]],
    ID["EPSG",2913]]
Data axis to CRS axis mapping: 1,2
AREA: String (0.0)
PERIMETER: Real (0.0)
PLS_: Integer (0.0)
PLS_ID: Integer (0.0)
TOWN: String (0.0)
RANGE: String (0.0)
SECTION: String (0.0)
QTR: String (0.0)
TR: String (0.0)
SYMBOL: Integer (0.0)
Shape_Length: Real (0.0)
Shape_Area: Real (0.0)
OGRFeature(PLSS):0
  AREA (String) = (null)
  PERIMETER (Real) = 21242.661
  PLS_ (Integer) = 79
  PLS_ID (Integer) = 33
  TOWN (String) = 8
  RANGE (String) = 9
  SECTION (String) = 18
  QTR (String) = B
  TR (String) = 8N9W
  SYMBOL (Integer) = 18
  Shape_Length (Real) = 21242.6608759667
  Shape_Area (Real) = 28202907.1147083
  MULTIPOLYGON (((7357078.35006562 935522.437992126,7356868.19389763 930222.284120739,7351565.17290026 930414.819881886,7351732.43339895 935325.079724416,7351745.4589895 935707.477034122,7353078.68208662 935661.216863513,7354411.90387139 935614.95800525,7355745.1269685 935568.698162735,7357078.35006562 935522.437992126)))
&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 19 Jan 2023 18:05:11 GMT</pubDate>
    <dc:creator>Brian_Wilson</dc:creator>
    <dc:date>2023-01-19T18:05:11Z</dc:date>
    <item>
      <title>How to list files in a personal geodatabse in Pro.</title>
      <link>https://community.esri.com/t5/python-questions/how-to-list-files-in-a-personal-geodatabse-in-pro/m-p/1249529#M66591</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I realize I can't do any sort of actual work (add to a map, geoprocess) with the contents of a personal geodatabase in Pro, but I was wondering if I could list its contents?&lt;/P&gt;&lt;P&gt;The reason I ask is because personal geodatabases are recognized by &lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/functions/listworkspaces.htm" target="_blank" rel="noopener"&gt;arcpy.listEnvironments()&lt;/A&gt;, so it seems like their contents should also be recognized, but I haven't been able to get it to work so far.&lt;/P&gt;&lt;P&gt;Is this possible at all?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Related: It'd be great if Esri added some sort of conversion for personal gdbs to file gdbs to Pro.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 16:24:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-list-files-in-a-personal-geodatabse-in-pro/m-p/1249529#M66591</guid>
      <dc:creator>AlfredBaldenweck</dc:creator>
      <dc:date>2023-01-19T16:24:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to list files in a personal geodatabse in Pro.</title>
      <link>https://community.esri.com/t5/python-questions/how-to-list-files-in-a-personal-geodatabse-in-pro/m-p/1249588#M66593</link>
      <description>&lt;P&gt;Actually, they included support with Pro. They did not make it easy. I won't speculate on why.&lt;/P&gt;&lt;P&gt;Look for ogr2ogr.py on your computer. On mine it is in "C:/Program Files/ArcGIS/Pro/bin/Python/envs/arcgispro-py3/Lib/site-packages/osgeo_utils/samples". That program is the swiss army knife of file conversions.&lt;/P&gt;&lt;P&gt;See if your computer has the personal geodatabase support in it. Activate a conda environment and run python, for example&lt;/P&gt;&lt;LI-CODE lang="c"&gt;conda activate arcgispro-py3
cd "C:/Program Files/ArcGIS/Pro/bin/Python/envs/arcgispro-py3/Lib/site-packages/osgeo_utils/samples"
python ogrinfo.py --formats
.
.
My system lists 77 supported formats here. The ESRI ones listed are

  ESRI Shapefile -vector- (rw+v): ESRI Shapefile
  ESRIJSON -vector- (rov): ESRIJSON
  PGeo -vector- (ro): ESRI Personal GeoDatabase
  OpenFileGDB -vector- (rov): ESRI FileGDB&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The ones you are interested in are the two database formats. Personal and FileGDB.&lt;/P&gt;&lt;P&gt;Older versions of GDAL (of which OGR is a member) support only reading FileGDB. Unfortunately that's what Esri gives you (see the "(rov)" which sadly means read-only.&lt;/P&gt;&lt;P&gt;You can read all details on the PGDB driver here: &lt;A href="https://gdal.org/drivers/vector/pgeo.html" target="_blank"&gt;https://gdal.org/drivers/vector/pgeo.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The FGDB information is here: &lt;A href="https://gdal.org/drivers/vector/openfilegdb.html" target="_blank"&gt;https://gdal.org/drivers/vector/openfilegdb.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If you want to be able to READ a PGDB and then WRITE to a FGDB you can update your copy of GDAL. It's probably incompatible with arcpy. But so what!! You have conda. You could do something like this&lt;/P&gt;&lt;LI-CODE lang="c"&gt;conda create --name=gdal python gdal
conda activate gdal
ogrinfo --version&lt;/LI-CODE&gt;&lt;P&gt;Now you have gdal version 3.6 installed,&amp;nbsp; and also it installs ALL the commands for you not just the Python libraries. So you can directly run commands without having to load Python. (Like "ogrinfo --version" instead of "python ogrinfo.py --version")&lt;/P&gt;&lt;P&gt;If you run "ogrinfo --formats" again you will see " OpenFileGDB -vector- (rw+v): ESRI FileGDB" which means you now have a tool that can translate PGDB to FGDB and it took you about 3 minutes to install it. And it's free. (I won't speculate why Esri does not included it with Pro since it's free?)&lt;/P&gt;&lt;P&gt;The ogrinfo tool should be able to list the contents of a PGDB. I don't have one!!&lt;/P&gt;&lt;P&gt;Here is an example of running it on a FGDB.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;ogrinfo TaxMaps.gdb
INFO: Open of `TaxMaps.gdb'
      using driver `OpenFileGDB' successful.
Layer: taxmap_anno (Multi Polygon)
Layer: seemap_anno (Multi Polygon)
Layer: bearing_anno (Multi Polygon)
Layer: taxlot_anno (Multi Polygon)
Layer: taxcode_anno (Multi Polygon)
Layer: PLSS (Multi Polygon)
Layer: Taxlots (Multi Polygon)
Layer: bearing_anno_aoi (Multi Polygon)
Layer: taxlot_anno_aoi (Multi Polygon)
Layer: Mapindex (Multi Polygon)
Layer: Reference_Lines (Multi Line String)
Layer: Taxlots_WM (Multi Polygon)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once I know all the layers in the database, I can get details on one layer,&lt;/P&gt;&lt;LI-CODE lang="c"&gt;ogrinfo TaxMaps.gdb PLSS
INFO: Open of `TaxMaps.gdb'
      using driver `OpenFileGDB' successful.

Layer name: PLSS
Geometry: Multi Polygon
Feature Count: 1
Extent: (7351565.172900, 930222.284121) - (7357078.350066, 935707.477034)
Layer SRS WKT:
PROJCRS["NAD83(HARN) / Oregon North (ft)",
    BASEGEOGCRS["NAD83(HARN)",
        DATUM["NAD83 (High Accuracy Reference Network)",
            ELLIPSOID["GRS 1980",6378137,298.257222101,
                LENGTHUNIT["metre",1]]],
        PRIMEM["Greenwich",0,
            ANGLEUNIT["degree",0.0174532925199433]],
        ID["EPSG",4152]],
    CONVERSION["SPCS83 Oregon North zone (International feet)",
        METHOD["Lambert Conic Conformal (2SP)",

... and it goes on and on listing everything ...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now that I know I can read a file geodatabase and I can get a list of layers, I can translate.&lt;/P&gt;&lt;P&gt;As I said above I DON'T HAVE ANY PGEO databases so I can't test it for you. In your case you would READ the PGEO and WRITE to whatever -- shapefile? UGH... I'd try going to a FGDB myself. This is just a test&lt;/P&gt;&lt;P&gt;Note the names are reversed, destination is first then source,&lt;/P&gt;&lt;LI-CODE lang="c"&gt;ogr2ogr -f "GeoJSON" plss.json TaxMaps.gdb PLSS

Note I have to give it the name of the layer (PLSS) in the FGDB as part of the source. This feature class has only one polygon in it, so I can dump the whole file here, 

ogrinfo plss.json PLSS
INFO: Open of `plss.json'
      using driver `GeoJSON' successful.

Layer name: PLSS
Geometry: Multi Polygon
Feature Count: 1
Extent: (7351565.172900, 930222.284121) - (7357078.350066, 935707.477034)
Layer SRS WKT:
PROJCRS["NAD83(HARN) / Oregon North (ft)",
    BASEGEOGCRS["NAD83(HARN)",
        DATUM["NAD83 (High Accuracy Reference Network)",
            ELLIPSOID["GRS 1980",6378137,298.257222101,
                LENGTHUNIT["metre",1]]],
        PRIMEM["Greenwich",0,
            ANGLEUNIT["degree",0.0174532925199433]],
        ID["EPSG",4152]],
    CONVERSION["SPCS83 Oregon North zone (International feet)",
        METHOD["Lambert Conic Conformal (2SP)",
            ID["EPSG",9802]],
        PARAMETER["Latitude of false origin",43.6666666666667,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8821]],
        PARAMETER["Longitude of false origin",-120.5,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8822]],
        PARAMETER["Latitude of 1st standard parallel",46,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8823]],
        PARAMETER["Latitude of 2nd standard parallel",44.3333333333333,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8824]],
        PARAMETER["Easting at false origin",8202099.738,
            LENGTHUNIT["foot",0.3048],
            ID["EPSG",8826]],
        PARAMETER["Northing at false origin",0,
            LENGTHUNIT["foot",0.3048],
            ID["EPSG",8827]]],
    CS[Cartesian,2],
        AXIS["easting (X)",east,
            ORDER[1],
            LENGTHUNIT["foot",0.3048]],
        AXIS["northing (Y)",north,
            ORDER[2],
            LENGTHUNIT["foot",0.3048]],
    USAGE[
        SCOPE["Engineering survey, topographic mapping."],
        AREA["United States (USA) - Oregon - counties of Baker; Benton; Clackamas; Clatsop; Columbia; Gilliam; Grant; Hood River; Jefferson; Lincoln; Linn; Marion; Morrow; Multnomah; Polk; Sherman; Tillamook; Umatilla; Union; Wallowa; Wasco; Washington; Wheeler; Yamhill."],
        BBOX[43.95,-124.17,46.26,-116.47]],
    ID["EPSG",2913]]
Data axis to CRS axis mapping: 1,2
AREA: String (0.0)
PERIMETER: Real (0.0)
PLS_: Integer (0.0)
PLS_ID: Integer (0.0)
TOWN: String (0.0)
RANGE: String (0.0)
SECTION: String (0.0)
QTR: String (0.0)
TR: String (0.0)
SYMBOL: Integer (0.0)
Shape_Length: Real (0.0)
Shape_Area: Real (0.0)
OGRFeature(PLSS):0
  AREA (String) = (null)
  PERIMETER (Real) = 21242.661
  PLS_ (Integer) = 79
  PLS_ID (Integer) = 33
  TOWN (String) = 8
  RANGE (String) = 9
  SECTION (String) = 18
  QTR (String) = B
  TR (String) = 8N9W
  SYMBOL (Integer) = 18
  Shape_Length (Real) = 21242.6608759667
  Shape_Area (Real) = 28202907.1147083
  MULTIPOLYGON (((7357078.35006562 935522.437992126,7356868.19389763 930222.284120739,7351565.17290026 930414.819881886,7351732.43339895 935325.079724416,7351745.4589895 935707.477034122,7353078.68208662 935661.216863513,7354411.90387139 935614.95800525,7355745.1269685 935568.698162735,7357078.35006562 935522.437992126)))
&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 19 Jan 2023 18:05:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-list-files-in-a-personal-geodatabse-in-pro/m-p/1249588#M66593</guid>
      <dc:creator>Brian_Wilson</dc:creator>
      <dc:date>2023-01-19T18:05:11Z</dc:date>
    </item>
  </channel>
</rss>

