public void MultiLineStringReverseTest() { ILineString lineString1 = Factory.CreateLineString(new Coordinate[] { new Coordinate(10, 10), new Coordinate(20, 20), new Coordinate(20, 30), }); ILineString lineString2 = Factory.CreateLineString(new Coordinate[] { new Coordinate(12, 12), new Coordinate(24, 24), new Coordinate(24, 36), }); IMultiLineString multiLineString = Factory.CreateMultiLineString(new[] { lineString1, lineString2, }); IMultiLineString reverse = multiLineString.Reverse(); Debug.WriteLine(multiLineString.ToString()); Debug.WriteLine(reverse.ToString()); Assert.IsTrue(multiLineString.Equals(reverse)); Assert.IsFalse(multiLineString.EqualsExact(reverse)); IGeometry result2 = reverse[1]; Assert.IsTrue(lineString1.Equals(result2)); Assert.IsFalse(lineString1.EqualsExact(result2)); IGeometry result1 = reverse[0]; Assert.IsTrue(lineString2.Equals(result1)); Assert.IsFalse(lineString2.EqualsExact(result1)); }
public void MultiLineStringReverseTest() { ILineString lineString1 = Factory.CreateLineString(new ICoordinate[] { new Coordinate(10, 10), new Coordinate(20, 20), new Coordinate(20, 30), }); ILineString lineString2 = Factory.CreateLineString(new ICoordinate[] { new Coordinate(12, 12), new Coordinate(24, 24), new Coordinate(36, 36), }); IMultiLineString multiLineString = Factory.CreateMultiLineString(new ILineString[] { lineString1, lineString2, }); IMultiLineString reverse = multiLineString.Reverse(); Debug.WriteLine(multiLineString.ToString()); Debug.WriteLine(reverse.ToString()); Assert.AreNotEqual(multiLineString, reverse); }