IRI.Maptor.Core.FileGdb
3.0.0
See the version list below for details.
dotnet add package IRI.Maptor.Core.FileGdb --version 3.0.0
NuGet\Install-Package IRI.Maptor.Core.FileGdb -Version 3.0.0
<PackageReference Include="IRI.Maptor.Core.FileGdb" Version="3.0.0" />
<PackageVersion Include="IRI.Maptor.Core.FileGdb" Version="3.0.0" />
<PackageReference Include="IRI.Maptor.Core.FileGdb" />
paket add IRI.Maptor.Core.FileGdb --version 3.0.0
#r "nuget: IRI.Maptor.Core.FileGdb, 3.0.0"
#:package IRI.Maptor.Core.FileGdb@3.0.0
#addin nuget:?package=IRI.Maptor.Core.FileGdb&version=3.0.0
#tool nuget:?package=IRI.Maptor.Core.FileGdb&version=3.0.0
IRI.Maptor.Core.FileGdb
Read-only support for ESRI File Geodatabases (.gdb folders), written from scratch in managed C#
with no third-party or native dependencies (no GDAL, no Esri FileGDB API).
Usage
using IRI.Maptor.Core.FileGdb;
using IRI.Maptor.Core.FileGdb.Enums;
var gdb = FileGeodatabase.Open(@"D:\data\Parcels.gdb"); // reads the catalog; keeps no files open
foreach (var dataset in gdb.Datasets)
Console.WriteLine($"{dataset.Name} [{dataset.AliasName}] {dataset.GeometryType} SRID={dataset.Srid} rows={dataset.RowCount}");
var parcels = gdb.GetDataset("Parcels")!;
foreach (var field in parcels.Fields)
Console.WriteLine($"{field.Name} [{field.AliasName}] {field.FieldType} domain={field.DomainName}");
var errors = new List<FileGdbRowError>();
foreach (var feature in parcels.ReadFeatures(new FileGdbReadOptions { OnRowError = errors.Add }))
{
long oid = feature.ObjectId; // 64-bit since ArcGIS Pro 3.2
var shape = feature.Geometry; // Geometry<Point>, null for a null shape
object? code = feature["Use"]; // the stored value
string? name = feature.GetCodedValueName("Use"); // its coded-value name, subtype-aware
var maptorFeature = feature.ToFeature(resolveCodedValues: true); // Feature<Point>
}
FileGeodatabase.Open(folder)lists datasets (feature classes and standalone tables), feature datasets, domains and relationship classes. Definitions that cannot be read are reported inWarningsinstead of failing the whole geodatabase.FileGdbDataset:- Catalog data: alias, feature dataset, subtypes and relationship classes.
- Physical schema, read on first use:
Fields,RowCount,GeometryType,HasZ/HasM,Extent. Srid/SpatialReference. The SRID comes fromLatestWKID, elseWKID, else the WKT, else 0. For example, Esri's 102100 becomes 3857.Storagesays whether the table is readable. Compressed and missing tables are listed, but reading them throws.
FileGdbFieldcombines the stored field (type, length, nullability, default) with the alias and domain from the dataset's definition.ReadFeaturesstreams the rows one at a time in OBJECTID order:- With
OnRowErrorset, a corrupt row or geometry is reported and skipped; without it, the read throws. BoundingBoxfilters by envelope. It still reads every row, because no spatial index is used.
- With
FileGdbFeature:- OBJECTID, geometry and stored values, by name or by index.
- The row's subtype, and coded-value names found through the domain of that subtype (falling back to the field's own domain).
GetDisplayValuekeeps values that are not in their domain, rather than losing them.ToFeatureconverts toFeature<Point>.
- Datasets that are not listed: topology bookkeeping tables (
T_{id}_DirtyAreas,_PointErrors,_LineErrors,_PolyErrors), attachment tables and their relationship classes, and raster datasets with theirfras_*helper tables.
What is read
- ArcGIS 10.x and ArcGIS Pro tables:
- 32-bit and 64-bit OBJECTIDs
- every field type, including the ArcGIS Pro 3.2 types: Int64, DateOnly, TimeOnly, DateTimeWithOffset
- deleted rows and sparse row-offset blocks
- Geometries:
- Point, Multipoint, Polyline (one part gives a
LineString, several parts aMultiLineString) and Polygon. - Polygon rings are grouped into holes and polygons by the shared
Geometry<T>.CreatePolygonOrMultiPolygon, with OGC orientation (outer ring counter-clockwise). - Z and M values are dropped.
- True curves (arcs, Béziers, elliptic arcs) become straight segments between their end vertices, and the feature reports
HasCurves.
- Point, Multipoint, Polyline (one part gives a
- Coded-value lookups ignore the numeric storage type, so a
shortvalue finds anxs:intcode.
Not supported
- ArcGIS 9.x geodatabases. Upgrade them in ArcGIS first.
- Compressed tables (CDF/SDC). Uncompress them in ArcGIS first.
- Multipatch geometries (the dataset is listed; reading it throws).
- Spatial and attribute indexes (
.spx,.atx) are not used. - Writing.
Format reference
The format is not published by Esri. This library follows the reverse-engineered description at
https://github.com/rouault/dump_gdbtable/wiki/FGDB-Spec. Where the wiki and GDAL's OpenFileGDB
driver disagree, it follows GDAL:
- the Z/M bits of the geometry-field flags
- when default-value bytes are present
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- IRI.Maptor.Core.Common (>= 3.0.0)
- IRI.Maptor.Core.Spatial (>= 3.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on IRI.Maptor.Core.FileGdb:
| Package | Downloads |
|---|---|
|
IRI.Maptor.Core.Persistence
A .NET standard library containing primitive types to work with persistence layers |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.1 | 200 | 12/1/2026 |
| 4.0.1-alpha | 174 | 12/1/2026 |
| 4.0.0 | 187 | 12/1/2026 |
| 4.0.0-alpha | 174 | 12/1/2026 |
| 3.0.0 | 102 | 11/10/2026 |
| 3.0.0-alpha | 111 | 10/29/2026 |