We are excited to announce the release of Aspose.GIS for .NET 18.6. This new release of API introduces support for .NET Standard 2.0 which lets you use the API in a variety of other type of applications. This release also introduces a new feature of working with GPS Exchange Format (GPX) files. For a detailed note on what is new and fixed, please visit the release notes section of API documentation.

Working with GPX Files using C#

This month’s release is not limited to providing support for additional Platforms. We are further pleased to share a new feature supported by the API where the API now provides the capability to read GPS Exchange Format (GPX) files. You can read the GPX files using the Gpx Drivers added to the API. Once loaded, you can:

  • Read waypoints from GPX file as Point Geometry of the API
  • Read routes from GPX file as Line String geometry
  • Read tracks from GPX file as Multi Line String geometry
using (var layer = Drivers.Gpx.Open(dataDir + "schiehallion.gpx"))
{
    foreach (var feature in layer)
    {
        switch (feature.Geometry.GeometryType)
        {
            // GPX waypoints are exported as features with point geometry.
            case GeometryType.Point:


                Console.WriteLine(feature.Geometry.Dimension);
                //HandleGpxWaypoint(feature);
                break;
            
            // GPX routes are exported as features with line string geometry.
            case GeometryType.LineString:

                //HandleGpxRoute(feature);
                LineString ls = (LineString)feature.Geometry;

                foreach (var point in ls)
                {
                    Console.WriteLine(point);
                }
                break;
            
                // GPX tracks are exported as features with multi line string geometry.
            // Every track segment is line string.
            case GeometryType.MultiLineString:

                //HandleGpxTrack(feature);
                Console.WriteLine(feature.Geometry);
                break;
            default: break;
        }
    }
}

Support for .NET Standard 2.0 and Mono Framework

Our continuous efforts to expand the supported .NET Frameworks by the API, Aspose.GIS for .NET now supports .NET Standard 2.0. Just after five releases, we have achieved the ability to provide support for .NET Standard 2.0 on Windows as well as Linux. In addition, the API can also be used with Mono Framework on Windows and Linux.

API Resources