A comprehensive .NET library for working with geospatial data, providing:
- Core geometry types: Point, Polygon, Polyline, and multi-variants with Z (elevation) and M (measure) support
- Data format parsers: DBF, GeoPackage, SpatiaLite, SQLite
- I/O formats: ESRI Shapefile, MapInfo TAB/MIF, GeoJSON, WKT, WKB
- Protobuf serialization: Efficient binary serialization for geometry data
- gRPC support: Protocol Buffers and gRPC integration
Install the core library:
dotnet add package Altemiq.GeometryInstall format-specific packages:
# Shapefile I/O
dotnet add package Altemiq.IO.Geometry.Shapefile
# MapInfo TAB I/O
dotnet add package Altemiq.IO.Geometry.MapInfo
# GeoPackage support
dotnet add package Altemiq.Data.GeoPackage
# SpatiaLite support
dotnet add package Altemiq.Data.Spatialite
# GeoJSON support
dotnet add package Altemiq.Text.GeoJson
# STAC support
dotnet add package Altemiq.Text.GeoJson.Stac
# Protobuf serialization
dotnet add package Altemiq.Geometry.Protobufusing Altemiq.Geometry;
using Altemiq.IO.Geometry;
using Altemiq.Text.GeoJson;
// Create a geometry
var point = new Point(10, 20);
// Parse WKT
var geometry = GeometryConverter.Parse("POINT(10 20)");
// Parse GeoJSON
var geojson = """
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [10, 20]
}
}
""";
var feature = GeoJsonConverter.Parse<Feature>(geojson);
// Read Shapefile
using var reader = new ShapefileReader("data.shp");
while (reader.Read())
{
var geom = reader.GetGeometry();
var attrs = reader.GetAttributes();
}- Altemiq.Geometry: Core geometry types and operations
- Altemiq.Data.Dbf: dBASE III and Visual FoxPro DBF file support
- Altemiq.Data.Geometry: Geometry data layer interfaces
- Altemiq.Data.Sqlite: SQLite data provider (with native binaries)
- Altemiq.Data.Sqlite.Core: SQLite core functionality
- Altemiq.Data.GeoPackage: GeoPackage data provider
- Altemiq.Data.GeoPackage.Core: GeoPackage core functionality
- Altemiq.Data.Spatialite: SpatiaLite data provider
- Altemiq.Data.Spatialite.Core: SpatiaLite core functionality
- Altemiq.IO.Geometry: WKT/WKB geometry I/O
- Altemiq.IO.Geometry.Shapefile: ESRI Shapefile I/O
- Altemiq.IO.Geometry.MapInfo: MapInfo TAB I/O
- Altemiq.IO.Geometry.Spatialite: SpatiaLite geometry I/O
- Altemiq.IO.Geometry.Spatialite.Core: SpatiaLite I/O core
- Altemiq.IO.Geodesy: Coordinate system WKT parsing
- Altemiq.Text.GeoJson: GeoJSON serialization
- Altemiq.Text.GeoJson.Stac: STAC catalog serialization
- Altemiq.Geometry.Protobuf: Protocol Buffers serialization
- Altemiq.Grpc.Geometry.Tools: Build-time gRPC/Protobuf tools
Most libraries support:
- .NET 7.0+
- .NET Standard 2.0+
- .NET Framework 4.61+ (where applicable)
dotnet build
dotnet testThis project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please read our contributing guidelines before submitting pull requests.