Meziantou.Framework.Geo.GeoPackage 1.0.1

Prefix Reserved
dotnet add package Meziantou.Framework.Geo.GeoPackage --version 1.0.1
                    
NuGet\Install-Package Meziantou.Framework.Geo.GeoPackage -Version 1.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Meziantou.Framework.Geo.GeoPackage" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Meziantou.Framework.Geo.GeoPackage" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Meziantou.Framework.Geo.GeoPackage" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Meziantou.Framework.Geo.GeoPackage --version 1.0.1
                    
#r "nuget: Meziantou.Framework.Geo.GeoPackage, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Meziantou.Framework.Geo.GeoPackage@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Meziantou.Framework.Geo.GeoPackage&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Meziantou.Framework.Geo.GeoPackage&version=1.0.1
                    
Install as a Cake Tool

Meziantou.Framework.Geo.GeoPackage

Reads the feature tables of GeoPackage files (.gpkg), the SQLite format that GDAL, QGIS and ArcGIS write, as the features of Meziantou.Framework.Geo. A table is read whole, or one row at a time with bounded memory, and the R-tree spatial index of a table reads only the features of a region.

Usage

// The layers of a GeoPackage file are its feature tables
var tables = GeoPackage.GetTables("TestData/places.gpkg");
Assert.Contains("cities", tables);

// The rows are read one at a time; with a box, the R-tree spatial index of the table finds the rows to read
var europe = new GeoBounds(West: -10, South: 35, East: 30, North: 60);
var names = new List<string?>();
await foreach (var city in GeoPackage.ReadFeaturesAsync("TestData/places.gpkg", "cities", new GeoPackageReaderOptions { Bounds = europe }))
{
    names.Add((string?)city.Properties["name"]);
}

Assert.Contains("Paris", names);
Assert.DoesNotContain("Tokyo", names);

The package uses Microsoft.Data.Sqlite and its native SQLite library.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Meziantou.Framework.Geo.GeoPackage:

Package Downloads
Meziantou.Framework.Geo.Maps.GeoPackage

Reads and writes the map bundles of Meziantou.Framework.Geo.Maps as GeoPackage files: one SQLite file per region, with a table and a spatial index per layer, that QGIS and GDAL open.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 41 11/13/2026
1.0.0 89 11/8/2026