muhammadahmad February 11, 20190 Comments

Read MapInfo TAB and MapInfo Interchange file formats with Aspose.GIS

Read MapInfo TAB and MapInfo Interchange file formats with Aspose.GIS

February 11, 2019
Share on FacebookTweet about this on TwitterShare on LinkedIn

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 and MapInfo Interchange file formats

This release of Aspose.GIS for .NET has added support for reading MapInfo TAB and MapInfo Interchange file formats as shown below in the code example.

Read MapInfo TAB File

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

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

Leave a comment

Posted inAspose.GIS Product Family
 

Related Articles