ESRI文件地理数据库(OpenFileGDB)
司机简称
OpenFileGDB
Driver built-in by default
This driver is built-in by default
OpenFileGDB驱动程序提供对ArcGIS 9及以上版本创建的文件geodatabase(.gdb目录)的矢量层的读取访问。数据集名称必须是目录/文件夹名称,并且必须以.gdb扩展名结尾。
它还可以直接读取zipped.gdb目录(扩展名为.gdb.zip),前提是它们在第一级包含一个.gdb目录。
也可以直接打开特定的.gdbtable文件(包括“system”表)。
几何图形中的曲线由GDAL>=2.2支持。
驱动程序功能
Supports Georeferencing
This driver supports georeferencing
Supports VirtualIO
This driver supports virtual I/O operations (/vsimem/, etc.)
空间滤波
由于gdal3.2,驱动程序可以使用native.spx空间索引进行空间过滤。
In earlier versions, it uses the minimum bounding rectangle included
at the beginning of the geometry blobs to speed up spatial filtering. By
default, it also builds on the fly a in-memory spatial index during
the first sequential read of a layer. Following spatial filtering
operations on that layer will then benefit from that spatial index. The
building of this in-memory spatial index can be disabled by setting the
OPENFILEGDB_IN_MEMORY_SPI
configuration option to NO.
SQL支持
SQL语句通过OGR SQL引擎运行。当存在属性索引(.atx文件)时,驱动程序将使用它们加速WHERE子句或SetAttributeFilter()调用。
特殊SQL请求
“GetLayerDefinition a_layer_name”和“GetLayerMetadata a_layer_name”可以用作特殊的SQL请求,分别获取作为XML内容的文件GDB表的定义和元数据(仅在使用ArcGIS 10或更高版本创建的地理数据库中可用)
数据集打开选项
LIST_ALL_TABLES=YES/NO: This may be "YES" to force all tables, including system and internal tables (such as the GDB_* tables) to be listed (since GDAL 3.4)
Field domains
3.3 新版功能.
Coded and range field domains are supported.
Hiearchical organization
3.4 新版功能.
The hiearchical organization of tables and feature classes as top-level
element or within a feature dataset can be explored using the methods
GDALDataset::GetRootGroup()
,
GDALGroup::GetGroupNames()
, GDALGroup::OpenGroup()
,
GDALGroup::GetVectorLayerNames()
and GDALGroup::OpenVectorLayer()
与FileGDB驱动程序的比较
(与使用FileGDB API SDK 1.4的FileGDB驱动程序进行比较)
OpenFileGDB驱动程序的优点:
可以读取ArcGis9.X地理数据库,而不仅仅是10或以上。
可以使用任何空间参照系统打开图层。
线程安全(即数据源可以并行处理)。
使用VSI虚拟文件API,使用户能够读取ZIP文件中或存储在HTTP服务器上的Geodatabase。
在具有大量字段的数据库上更快。
不依赖于第三方库。
对损坏的Geodatabase文件具有健壮性。
OpenFileGDB驱动程序的缺点:
只读。
无法从CDF格式(压缩数据格式)的压缩数据中读取数据。
实例
从FileGDB读取层并加载到PostGIS:
ogr2ogr -overwrite -f "PostgreSQL" PG:"host=myhost user=myuser dbname=mydb password=mypass" "C:\somefolder\BigFileGDB.gdb" "MyFeatureClass"
获取文件gdb的详细信息:
ogrinfo -al "C:\somefolder\MyGDB.gdb"
获取压缩文件gdb的详细信息:
ogrinfo -al "C:\somefolder\MyGDB.gdb.zip"
链接
FileGDB driver ,依赖于FileGDB API SDK
逆向工程规范 FileGDB format