Integrate the WKT-WBT API into your .NET-based applications to import, export, specify, and convert geometry.
ILineString line = (ILineString)Geometry.FromText("LINESTRING Z (0.1 0.2 0.3, 1 2 1, 12 23 2)");
Console.WriteLine(line.Count); // 3
IGeometry geometry = Geometry.FromText("LINESTRING (1.2 3.4, 5.6 7.8)");
byte[] wkb = geometry.AsBinary();
File.WriteAllBytes(Path.Combine(RunExamples.GetDataDir(), "WkbFile.wkb"), wkb);
IGeometry geometry = Geometry.FromText("LINESTRING (1.2 3.4, 5.6 7.8)");
byte[] wkb = geometry.AsBinary(WkbVariant.ExtendedPostGis);
File.WriteAllBytes(Path.Combine(RunExamples.GetDataDir(), "EWkbFile.ewkb"), wkb);
There are a simple way to install Aspose.GIS for .NET onto your system:
Aspose.GIS WKT-WKB API for .NET is supported on most platforms and operating systems and it can be used to develop several different types of .NET apps including ASP .NET, WinForms and Windows Services. API for .NET is easy to use and deploy, and provides the ideal solution to work with geospatial information with .NET Framework 4.7, .NET Standard 2.0 & Xamarin platforms. Before running the code, please make sure your system meets the appropriate requirements.
Try the features of our library to see new opportunities. Live demos in C#