
We are pleased to announce the release of Aspose.GIS for .NET 19.2. This release gives you the ability to work with MapInfo TAB and MapInfo Interchange file formats. For a complete list of what is new and fixed, please visit the release notes section of the API documentation.
Read MapInfo TAB File in C#
The following code sample shows how to read MapInfo TAB files using C#:
string TestDataPath = RunExamples.GetDataDir();
using (var layer = Drivers.MapInfoTab.OpenLayer(Path.Combine
(TestDataPath, "data.tab")))
{
Console.WriteLine($"Number of features is {layer.Count}.");
var lastGeometry = layer[layer.Count - 1].Geometry;
Console.WriteLine($"Last geometry is {lastGeometry.AsText()}.");
foreach (Feature feature in layer)
{
Console.WriteLine(feature.Geometry.AsText());
}
}
Read MapInfo Interchange File in C#
The following code sample shows how to read the MapInfo Interchange File in C#.
string TestDataPath = RunExamples.GetDataDir();
using (var layer = Drivers.MapInfoInterchange.OpenLayer(
Path.Combine(TestDataPath, "data.mif")))
{
Console.WriteLine($"Number of features is {layer.Count}.");
var lastGeometry = layer[layer.Count - 1].Geometry;
Console.WriteLine($"Last geometry is {lastGeometry.AsText()}.");
foreach (Feature feature in layer)
{
Console.WriteLine(feature.Geometry.AsText());
}
}
The following API resources can be of help to you in getting started with Aspose.GIS:
API Resources
- Product Home Page – Gives you a detailed overview of Aspose.GIS for .NET API
- API Reference Guide – Details the namespaces and classes of the API
- GitHub Examples – Provides ready to run API Examples
- Support Forum – Write to us if you have any query or inquiry about the API