OpenStreetMap XML file format support with Aspose.GIS for .NET 18.5

Share on FacebookTweet about this on TwitterShare on LinkedIn

We are pleased to announce the release of Aspose.GIS for .NET 18.5. This release introduces new feature of support for OpenStreetMap XML file. It also includes improvements to API functionality in terms of bug fixes. For a complete list of what is new and fixed, please visit the release notes section of API.  

Support for OpenStreetMap XML File Format

This release of API provide supports for OpenStreetMap (OSM) XML file format which is a collaborative project to create a free editable map of the world. The API supports reading OSM XML file for now and writing is not supported at the moment. OSM XML file can be loaded like other file formats using the API’s Driver class as can be seen in the following sample code.

using (var layer = Drivers.OsmXml.Open(dataDir + "fountain.osm"))
{
    // get feratures count
    int count = layer.Count;

    Console.WriteLine("Layer count: " + count);
    // get feature at index 2
    Feature featureAtIndex2 = layer[2];

    // iterate through all features.
    foreach (Feature feature in layer)
    {
        // handle feature
        Console.WriteLine(feature.Geometry.GeometryType);
    }
}

API Resources