Browse our Products

Aspose.GIS for .NET 26.3 Release Notes

Full List of Issues Covering all Changes in this Release

KeySummaryCategory
GISNET-1973Support MultiPolygon Geometry Type For EsriJson Format on conversionsFeature
GISNET-1984Incorrect Count Of Layers For Gpx Format in NET Core 3.1Bug
GISNET-1976Using of “WritePolygonsAsLines” Option For Gpx FormatExample

Public API and Backward Incompatible Changes

Following members have been added:

  • None

Following members have been removed:

  • None

Usage examples:

GISNET-1973. Support MultiPolygon Geometry Type For EsriJson Format on conversions

// EsriJson doesn't support "MultiPolygon" geometry type by design.
// It uses Exterior and Interiors rings instead.
// So, we implemented correct conversions on that automatically replace the MultiPolygon with supported Rings

var multiPolygon = new MultiPolygon
{
	new Polygon(new LinearRing(new [] { new Point(0, 0), new Point(10, 0), new Point(10, 10), new Point(0, 10), new Point(0, 0)}),
	new List() {new LinearRing(new[] { new Point(3, 3), new Point(3, 6), new Point(6, 6), new Point(6, 3), new Point(3, 3) }) }),
	new Polygon(new LinearRing(new [] { new Point(30, 0), new Point(40, 0), new Point(40, 10), new Point(30, 10), new Point(30, 0)}),
	new List() {new LinearRing(new[] { new Point(33, 3), new Point(33, 6), new Point(36, 6), new Point(36, 3), new Point(33, 3) }) })
};
using (var layer = VectorLayer.Create(fileName, Drivers.EsriJson, options))
{
	var feature = layer.ConstructFeature();
	feature.Geometry = multiPolygon ;
	layer.Add(feature);
}

GISNET-1984. Incorrect Count Of Layers For Gpx Format in NET Core 3.1

	 var options = new ConversionOptions();
	 options.DestinationDriverOptions = new GpxOptions() { WritePolygonsAsLines = true };

	 string sourcePath = "daniSample.shp";
	 string destinationPath = "output.gpx";
	 VectorLayer.Convert(sourcePath, Drivers.Shapefile, destinationPath, Drivers.Gpx, options);
	 using (var layer = VectorLayer.Open(destinationPath, Drivers.Gpx))
	 {
		 Assert.AreEqual(6, layer.Count);
		 Assert.AreEqual(23, layer.Attributes.Count);
	 }

GISNET-1976. Using of “WritePolygonsAsLines” Option For Gpx Format

// GpxDriver doesn't support 'Polygon' and 'MultiPolygon' geometry type by design
// But you can use option WritePolygonsAsLines = true for conversions to avoid this

var options = new ConversionOptions();
options.DestinationDriverOptions = new GpxOptions() { WritePolygonsAsLines = true };

string sourcePath = Path.Combine("set the path to file");
string destinationPath = GetOutputPath(".gpx");
VectorLayer.Convert(sourcePath, Drivers.Shapefile, destinationPath, Drivers.Gpx, options);