0

Before loading a feature class from a File Geodatabase (.gdb) to PostgreSQL, I would like to check some general information such as the number of polygons, the bounding box or the attribute table.

The following GDAL versions is installed on my computer: GDAL 2.2.1, released 2017/06/23

Is there a way to do this in the command line? I would try it with ogrinfo, but did not find information about that in the internet, but some hints on this Cheat Sheet only provided information for ESRI Shapefiles (.shp)

  • A Personal Geodatabase uses a .mdb suffix. File Geodatabase uses a .gdb suffix. – Vince Jan 9 '18 at 13:06
  • You are right. Changed it. – Li Ku Jan 9 '18 at 13:16
0

In principle, if your version of GDAL is built to support Personal Geodatabases, you should be able to retrieve metadata using gdalinfo as follows:

ogrinfo -so -al PGeo:sample_pgeo

Where sample_pgeo is a name of DSN entry in the .odbc.ini file.

If you want to retrieve metadata for only one layer, than you would do:

ogrinfo -so -al PGeo:sample_pgeo <layer_name>

Note that you can check that your GDAL supports Personal Geodatabases by confirming that both 'PGeo' is listed when you run ogrinfo --formats. More details concerning configuration and use of the Personal Geodatabase driver are provided here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.