A .NET standard library to read/write shapefile (*.shp, *.shx, *.dbf, *.prj)
$ dotnet add package IRI.Maptor.Sta.ShapefileFormatA comprehensive .NET Standard 2.1 library for reading, writing, and converting ESRI Shapefile formats with advanced geometry support, international character encoding, and coordinate system transformations.
| Point Types | Polyline Types | Polygon Types | Multipoint Types |
|---|---|---|---|
| Point | Polyline | Polygon | Multipoint |
| PointM | PolylineM | PolygonM | MultipointM |
| PointZ | PolylineZ | PolygonZ | MultipointZ |
Install-Package IRI.Maptor.Sta.ShapefileFormat
dotnet add package IRI.Maptor.Sta.ShapefileFormat
<PackageReference Include="IRI.Maptor.Sta.ShapefileFormat" Version="2.8.6" />
using IRI.Maptor.Sta.ShapefileFormat;
var esriShapes = await Shapefile.ReadShapesAsync("path/to/file.shp");
foreach (var shape in esriShapes)
{
Console.WriteLine($"Geometry: {shape.AsSqlServerWkt()}");
}