Aspose.GIS for .NET 18.3 Release Notes

Major Features

Major features and improvements in this release:

  • Reading and writing data in KML format.
  • Geometry Validation

Full List of Issues Covering all Changes in this Release

Key Summary Category
GISNET-134 Geometry Validation New Feature
GISNET-139 Streamline handling of Null values Improvement
GISNET-135 Keyhole Markup Language (KML) New Feature
GISTNET-157 Handle empty geometries Improvement
GISNET-162 Members added to geometry collection accommodate dimension Bug

Public API and Backward Incompatible Changes

This version includes certain Public API Changes that affect the existing implementations. These are as detailed below.

Feature.Geometry changed type to IGeometry

Feature.Geometry changed type from Geometry to IGeometry. If you store Feature.Geometry or pass it to methods, change type from Geometry to IGeometry (public APIs of IGeometry and Geometry are same).

C# (since v18.3)
void HandleFeature(Feature feature)
{
IGeometry geometry = feature.Geometry;
HandleGeometry(geometry);
}

void HandleGeometry(IGeometry geometry)
{
// handle geometry
}
C# (before v18.3)

void HandleFeature(Feature feature)
{
Geometry geometry = feature.Geometry;
HandleGeometry(geometry);
}

void HandleGeometry(Geometry geometry)
{
// handle geometry
}

Geometry.Null changed type from Geometry to IGeometry

Geometry.Null changed its type from Geometry to IGeometry. If you store Geometry.Null or pass it to methods, change type from Geometry to IGeometry (public APIs of IGeometry and Geometry are same).

C# (since v18.3)
void Main()
{
HandleGeometry(Geometry.Null);
}

void HandleGeometry(IGeometry geometry)
{
// handle geometry
}
C# (before v18.3)
void Main()
{
HandleGeometry(Geometry.Null);
}

void HandleGeometry(Geometry geometry)
{
// handle geometry
}
GeometryCollection.Add(IEnumerable geometries) renamed to AddRange
C# (since v18.3)
GeometryCollection collection = new GeometryCollection();
collection.AddRange(new[] {new Point(0, 0), new Point(1, 0) });
C# (before v18.3)
GeometryCollection collection = new GeometryCollection();
collection.Add(new[] {new Point(0, 0), new Point(1, 0) });
GeometryCollection inherits IEnumerable instaed of IEnumerable

If you store the result of enumeration or pass it to methods, change types from Geometry to IGeometry (public APIs of IGeometry and Geometry are same).

C# (since v18.3)
void HandleGeometryCollection(GeometryCollection collection)
{
foreach (IGeometry geometry in collection)
{
HandleGeometry(geometry);
}
}

void HandleGeometry(IGeometry geometry)
{
// handle geometry
}
C# (before v18.3)
void HandleGeometryCollection(GeometryCollection collection)
{
foreach (Geometry geometry in collection)
{
HandleGeometry(geometry);
}
}

void HandleGeometry(Geometry geometry)
{
// handle geometry
}
GeometryCollection returns IGeometry instead of Geometry

GeometryCollection returns IGeometry interface instead of Geometry from indexer “this[int index]”. If you store the resulf of indexer or pass it to methods, change types from Geometry to IGeometry (public APIs of IGeometry and Geometry are same). 

C# (since v18.3)
void HandleThirdElement(GeometryCollection collection)
{
IGeometry third = collection[2];
HandleGeometry(third);
}

void HandleGeometry(IGeometry geometry)
{
// handle geometry
}
C# (before v18.3)

void HandleGeometryCollection(GeometryCollection collection)
{
Geometry third = collection[2];
HandleGeometry(third);
}

void HandleGeometry(Geometry geometry)
{
// handle geometry
}