1. Products
  2.   Aspose.GIS
  3.   .NET
  4.   WKT-WKB Formats


Easy way Translate to WKT or Translate to WKB

Integrate the WKT-WBT API into your .NET-based applications to import, export, specify, and convert geometry.

  Download Free Trial
Aspose.GIS for .NET
The WKT-WKB .NET API is part of the powerful Aspose.GIS .NET library for managing WKT and WKB geometry formats. Our library allows you to convert various textual representations of geometry objects from WKT (Well-Known Text) to WKB (Well-Known Binary) and reverse with more advantages, including:

  • Extract geometry from WKT or WKB geometry format
  • Insert geometry to WKT or WKB geometry format
  • Specify WKT or WKB Variation
  • Convert geometry to editable format

For a complete list of new features and fixes, please see the release notes section of the GIS.API documentation.

Build 32-bit or 64-bit .NET applications, including ASP.NET, WinForms, WPF, Windows Services, .NET Standard, and more using our library.

Integrate the Aspose.WKT and WBT API for .NET into your .NET applications to provide end users with the ability to accurately convert between formats without the need to install external software and avoid using third-party websites.

Some code samples to test. For full examples and data files, visit Github.

Our latest release with several new methods helps to avoid public API issues and backward-compatible changes like:
  • Static method Geometry.FromText - generate geometry from WKT
  • Static method Geometry.FromBinary - generate geometry from WKB
  • Geometry methods .AsText - convert geometry to WKT
  • Geometry methods .AsBinary - convert geometry to WKB
  • Geometry methods .ToEditable - creates a copy of the current geometry that you can edit
  • The Aspose.WKT-WKB API for .Net is created by and for developers. Our team is constantly improving and adding new features to our library based on user feedback and market needs.


Why Aspose.GIS for .NET?

Aspose’s customers are drawn from various industries, from software developers and consulting companies to banks, government agencies, and academic institutions. Whenever you need experience in GIS, you need an Aspose.GIS product.
Some of our 21,000+ customers around the world have shared their success stories already.


Our API comes with clear code samples, free and paid web services, subscription downloadable databases, and free downloadable databases.
Geometry from WKT
ILineString line = (ILineString)Geometry.FromText("LINESTRING Z (0.1 0.2 0.3, 1 2 1, 12 23 2)");
Console.WriteLine(line.Count); // 3
Geometry to WKB
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);
Specify WKB Variation
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);

C# Aspose.GIS WKT-WKB library

There are a simple way to install Aspose.GIS for .NET onto your system:

  • Install Package Aspose.GIS from Package Manager Console in Visual Studio to get the NuGet package;
  • Or you can download package from our site;
  • Update Package Aspose.GIS. to upgrade to the latest version;
  • Add Aspose.GIS for .NET to your system by installing NuGet Package;
  • See Documentation.

System Requirements

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.