Meziantou.Framework.Geo.Maps.GeoPackage
1.0.3
Prefix Reserved
dotnet add package Meziantou.Framework.Geo.Maps.GeoPackage --version 1.0.3
NuGet\Install-Package Meziantou.Framework.Geo.Maps.GeoPackage -Version 1.0.3
<PackageReference Include="Meziantou.Framework.Geo.Maps.GeoPackage" Version="1.0.3" />
<PackageVersion Include="Meziantou.Framework.Geo.Maps.GeoPackage" Version="1.0.3" />
<PackageReference Include="Meziantou.Framework.Geo.Maps.GeoPackage" />
paket add Meziantou.Framework.Geo.Maps.GeoPackage --version 1.0.3
#r "nuget: Meziantou.Framework.Geo.Maps.GeoPackage, 1.0.3"
#:package Meziantou.Framework.Geo.Maps.GeoPackage@1.0.3
#addin nuget:?package=Meziantou.Framework.Geo.Maps.GeoPackage&version=1.0.3
#tool nuget:?package=Meziantou.Framework.Geo.Maps.GeoPackage&version=1.0.3
Meziantou.Framework.Geo.Maps.GeoPackage
Reads and writes the map bundles of Meziantou.Framework.Geo.Maps as GeoPackage files: one file per region, such as
France.gpkg, with a table and an R-tree spatial index per layer, that QGIS, GDAL and ArcGIS open. The files are
GeoPackage 1.4, in WGS 84, and the metadata of the map is in the metadata extension.
Usage
// Write the map of a region as a GeoPackage file, which QGIS and GDAL open, such as maps/Switzerland.gpkg
var directory = Directory.CreateTempSubdirectory().FullName;
var switzerland = MapCatalog.Default.GetMap("Switzerland");
GeoPackageMapFormat.Instance.Write(GeoPackageMapFormat.Instance.GetPath(directory, switzerland.Region), switzerland);
// A catalog reads the GeoPackage files when it has the format, here before the folder formats
var catalog = new MapCatalog(directory, [GeoPackageMapFormat.Instance, .. MapCatalog.DefaultFormats]);
Assert.Equal(["Switzerland"], catalog.Regions);
var map = catalog.GetMap("Switzerland");
Assert.HasCount(26, map.Load(MapLayer.StatesProvinces));
The tools/Meziantou.Framework.Geo.Maps.Tool tool of the repository writes GeoPackage bundles with --format gpkg. The package uses Microsoft.Data.Sqlite
and its native SQLite library, and reads the layers with Meziantou.Framework.Geo.GeoPackage.
| Product | Versions 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. |
-
net10.0
- Meziantou.Framework.Geo.GeoPackage (>= 1.0.1)
- Meziantou.Framework.Geo.Maps (>= 1.0.3)
- Microsoft.Data.Sqlite (>= 10.0.14)
-
net11.0
- Meziantou.Framework.Geo.GeoPackage (>= 1.0.1)
- Meziantou.Framework.Geo.Maps (>= 1.0.3)
- Microsoft.Data.Sqlite (>= 10.0.14)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.