Index: Core/Components/src/Core.Components.DotSpatial/Converter/MapLineDataConverter.cs =================================================================== diff -u -ra3c8c0cb4384de51a18d77cc7bea487f97ba21e1 -r33c64ea2cd6b287bf5954e63a548d89dadb7f153 --- Core/Components/src/Core.Components.DotSpatial/Converter/MapLineDataConverter.cs (.../MapLineDataConverter.cs) (revision a3c8c0cb4384de51a18d77cc7bea487f97ba21e1) +++ Core/Components/src/Core.Components.DotSpatial/Converter/MapLineDataConverter.cs (.../MapLineDataConverter.cs) (revision 33c64ea2cd6b287bf5954e63a548d89dadb7f153) @@ -36,7 +36,7 @@ { protected override IList Convert(MapLineData data) { - var coordinates = data.Points.Select(p => new Coordinate(p.Item1, p.Item2)); + var coordinates = data.Points.Select(p => new Coordinate(p.X, p.Y)); var lineString = new LineString(coordinates); var featureSet = new FeatureSet(FeatureType.Line); Index: Core/Components/src/Core.Components.DotSpatial/Converter/MapPointDataConverter.cs =================================================================== diff -u -ra3c8c0cb4384de51a18d77cc7bea487f97ba21e1 -r33c64ea2cd6b287bf5954e63a548d89dadb7f153 --- Core/Components/src/Core.Components.DotSpatial/Converter/MapPointDataConverter.cs (.../MapPointDataConverter.cs) (revision a3c8c0cb4384de51a18d77cc7bea487f97ba21e1) +++ Core/Components/src/Core.Components.DotSpatial/Converter/MapPointDataConverter.cs (.../MapPointDataConverter.cs) (revision 33c64ea2cd6b287bf5954e63a548d89dadb7f153) @@ -39,7 +39,7 @@ foreach (var point in data.Points) { - featureSet.Features.Add(new Coordinate(point.Item1, point.Item2)); + featureSet.Features.Add(new Coordinate(point.X, point.Y)); } return new List Index: Core/Components/src/Core.Components.DotSpatial/Converter/MapPolygonDataConverter.cs =================================================================== diff -u -ra3c8c0cb4384de51a18d77cc7bea487f97ba21e1 -r33c64ea2cd6b287bf5954e63a548d89dadb7f153 --- Core/Components/src/Core.Components.DotSpatial/Converter/MapPolygonDataConverter.cs (.../MapPolygonDataConverter.cs) (revision a3c8c0cb4384de51a18d77cc7bea487f97ba21e1) +++ Core/Components/src/Core.Components.DotSpatial/Converter/MapPolygonDataConverter.cs (.../MapPolygonDataConverter.cs) (revision 33c64ea2cd6b287bf5954e63a548d89dadb7f153) @@ -36,7 +36,7 @@ { protected override IList Convert(MapPolygonData data) { - var coordinates = data.Points.Select(p => new Coordinate(p.Item1, p.Item2)); + var coordinates = data.Points.Select(p => new Coordinate(p.X, p.Y)); var polygon = new Polygon(coordinates); var featureSet = new FeatureSet(FeatureType.Polygon); Index: Core/Components/src/Core.Components.DotSpatial/Core.Components.DotSpatial.csproj =================================================================== diff -u -r9f8c22d452747d0d7b435f91f4a44b0b89714089 -r33c64ea2cd6b287bf5954e63a548d89dadb7f153 --- Core/Components/src/Core.Components.DotSpatial/Core.Components.DotSpatial.csproj (.../Core.Components.DotSpatial.csproj) (revision 9f8c22d452747d0d7b435f91f4a44b0b89714089) +++ Core/Components/src/Core.Components.DotSpatial/Core.Components.DotSpatial.csproj (.../Core.Components.DotSpatial.csproj) (revision 33c64ea2cd6b287bf5954e63a548d89dadb7f153) @@ -69,6 +69,11 @@ + + {3bbfd65b-b277-4e50-ae6d-bd24c3434609} + Core.Common.Base + False + {c90b77da-e421-43cc-b82e-529651bc21ac} Core.Common.Version Index: Core/Components/src/Core.Components.Gis.IO/Core.Components.Gis.IO.csproj =================================================================== diff -u -rcd709418712e8fa50e2e8a0da0e2488139ac9054 -r33c64ea2cd6b287bf5954e63a548d89dadb7f153 --- Core/Components/src/Core.Components.Gis.IO/Core.Components.Gis.IO.csproj (.../Core.Components.Gis.IO.csproj) (revision cd709418712e8fa50e2e8a0da0e2488139ac9054) +++ Core/Components/src/Core.Components.Gis.IO/Core.Components.Gis.IO.csproj (.../Core.Components.Gis.IO.csproj) (revision 33c64ea2cd6b287bf5954e63a548d89dadb7f153) @@ -72,6 +72,10 @@ + + {3BBFD65B-B277-4E50-AE6D-BD24C3434609} + Core.Common.Base + {e344867e-9ac9-44c8-88a5-8185681679a9} Core.Common.IO Index: Core/Components/src/Core.Components.Gis.IO/PolylineShapeFileReader.cs =================================================================== diff -u -ra3c8c0cb4384de51a18d77cc7bea487f97ba21e1 -r33c64ea2cd6b287bf5954e63a548d89dadb7f153 --- Core/Components/src/Core.Components.Gis.IO/PolylineShapeFileReader.cs (.../PolylineShapeFileReader.cs) (revision a3c8c0cb4384de51a18d77cc7bea487f97ba21e1) +++ Core/Components/src/Core.Components.Gis.IO/PolylineShapeFileReader.cs (.../PolylineShapeFileReader.cs) (revision 33c64ea2cd6b287bf5954e63a548d89dadb7f153) @@ -23,7 +23,7 @@ using System.Data; using System.IO; using System.Linq; - +using Core.Common.Base.Geometry; using Core.Common.IO.Exceptions; using Core.Common.Utils; using Core.Common.Utils.Builders; @@ -137,7 +137,7 @@ private MapLineData ConvertSingleLineFeatureToMapLineData(IFeature lineFeature) { - var lineData = new MapLineData(lineFeature.Coordinates.Select(c => Tuple.Create(c.X, c.Y))); + var lineData = new MapLineData(lineFeature.Coordinates.Select(c => new Point2D(c.X, c.Y))); DataTable table = lineShapeFile.GetAttributes(readIndex, 1); DataRow dataRow = table.Rows[0]; for (int i = 0; i < table.Columns.Count; i++) Index: Core/Components/src/Core.Components.Gis/Core.Components.Gis.csproj =================================================================== diff -u -r61f3b606ba0003553fe583462bab6e493043be5e -r33c64ea2cd6b287bf5954e63a548d89dadb7f153 --- Core/Components/src/Core.Components.Gis/Core.Components.Gis.csproj (.../Core.Components.Gis.csproj) (revision 61f3b606ba0003553fe583462bab6e493043be5e) +++ Core/Components/src/Core.Components.Gis/Core.Components.Gis.csproj (.../Core.Components.Gis.csproj) (revision 33c64ea2cd6b287bf5954e63a548d89dadb7f153) @@ -56,6 +56,10 @@ + + {3BBFD65B-B277-4E50-AE6D-BD24C3434609} + Core.Common.Base + {c90b77da-e421-43cc-b82e-529651bc21ac} Core.Common.Version Index: Core/Components/src/Core.Components.Gis/Data/MapLineData.cs =================================================================== diff -u -rdb6ab4e99bb2e88eb22d5706cc7ebca95982387b -r33c64ea2cd6b287bf5954e63a548d89dadb7f153 --- Core/Components/src/Core.Components.Gis/Data/MapLineData.cs (.../MapLineData.cs) (revision db6ab4e99bb2e88eb22d5706cc7ebca95982387b) +++ Core/Components/src/Core.Components.Gis/Data/MapLineData.cs (.../MapLineData.cs) (revision 33c64ea2cd6b287bf5954e63a548d89dadb7f153) @@ -21,6 +21,7 @@ using System; using System.Collections.Generic; +using Core.Common.Base.Geometry; namespace Core.Components.Gis.Data { @@ -34,7 +35,7 @@ /// /// A of as (X,Y) points. /// Thrown when is null. - public MapLineData(IEnumerable> points) : base(points) + public MapLineData(IEnumerable points) : base(points) { MetaData = new Dictionary(); } Index: Core/Components/src/Core.Components.Gis/Data/MapPointData.cs =================================================================== diff -u -r61f3b606ba0003553fe583462bab6e493043be5e -r33c64ea2cd6b287bf5954e63a548d89dadb7f153 --- Core/Components/src/Core.Components.Gis/Data/MapPointData.cs (.../MapPointData.cs) (revision 61f3b606ba0003553fe583462bab6e493043be5e) +++ Core/Components/src/Core.Components.Gis/Data/MapPointData.cs (.../MapPointData.cs) (revision 33c64ea2cd6b287bf5954e63a548d89dadb7f153) @@ -21,6 +21,7 @@ using System; using System.Collections.Generic; +using Core.Common.Base.Geometry; namespace Core.Components.Gis.Data { @@ -34,6 +35,6 @@ /// /// A of as (X,Y) coordinates. /// Thrown when is null. - public MapPointData(IEnumerable> points) : base(points) {} + public MapPointData(IEnumerable points) : base(points) {} } } \ No newline at end of file Index: Core/Components/src/Core.Components.Gis/Data/MapPolygonData.cs =================================================================== diff -u -r61f3b606ba0003553fe583462bab6e493043be5e -r33c64ea2cd6b287bf5954e63a548d89dadb7f153 --- Core/Components/src/Core.Components.Gis/Data/MapPolygonData.cs (.../MapPolygonData.cs) (revision 61f3b606ba0003553fe583462bab6e493043be5e) +++ Core/Components/src/Core.Components.Gis/Data/MapPolygonData.cs (.../MapPolygonData.cs) (revision 33c64ea2cd6b287bf5954e63a548d89dadb7f153) @@ -21,6 +21,7 @@ using System; using System.Collections.Generic; +using Core.Common.Base.Geometry; namespace Core.Components.Gis.Data { @@ -34,6 +35,6 @@ /// /// A of as (X,Y) points. /// Thrown when is null. - public MapPolygonData(IEnumerable> points) : base(points) {} + public MapPolygonData(IEnumerable points) : base(points) {} } } \ No newline at end of file Index: Core/Components/src/Core.Components.Gis/Data/PointBasedMapData.cs =================================================================== diff -u -r61f3b606ba0003553fe583462bab6e493043be5e -r33c64ea2cd6b287bf5954e63a548d89dadb7f153 --- Core/Components/src/Core.Components.Gis/Data/PointBasedMapData.cs (.../PointBasedMapData.cs) (revision 61f3b606ba0003553fe583462bab6e493043be5e) +++ Core/Components/src/Core.Components.Gis/Data/PointBasedMapData.cs (.../PointBasedMapData.cs) (revision 33c64ea2cd6b287bf5954e63a548d89dadb7f153) @@ -22,6 +22,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Core.Common.Base.Geometry; namespace Core.Components.Gis.Data { @@ -35,7 +36,7 @@ /// /// A of as (X,Y) coordinates. /// Thrown when is null. - protected PointBasedMapData(IEnumerable> points) + protected PointBasedMapData(IEnumerable points) { if (points == null) { @@ -54,6 +55,6 @@ /// /// Gets the collection of points in 2D space. /// - public IEnumerable> Points { get; private set; } + public IEnumerable Points { get; private set; } } } \ No newline at end of file Index: Core/Components/test/Core.Components.DotSpatial.Forms.Test/BaseMapTest.cs =================================================================== diff -u -rae34e25064174cb82307bbd514ef3d37bf49586b -r33c64ea2cd6b287bf5954e63a548d89dadb7f153 --- Core/Components/test/Core.Components.DotSpatial.Forms.Test/BaseMapTest.cs (.../BaseMapTest.cs) (revision ae34e25064174cb82307bbd514ef3d37bf49586b) +++ Core/Components/test/Core.Components.DotSpatial.Forms.Test/BaseMapTest.cs (.../BaseMapTest.cs) (revision 33c64ea2cd6b287bf5954e63a548d89dadb7f153) @@ -1,7 +1,7 @@ using System; using System.Linq; using System.Windows.Forms; - +using Core.Common.Base.Geometry; using Core.Common.Utils.Reflection; using Core.Components.DotSpatial.TestUtil; using Core.Components.Gis.Data; @@ -61,7 +61,7 @@ { // Setup var map = new BaseMap(); - var testData = new MapPointData(Enumerable.Empty>()); + var testData = new MapPointData(Enumerable.Empty()); // Call map.Data = testData; @@ -75,7 +75,7 @@ { // Setup var map = new BaseMap(); - var testData = new MapPointData(Enumerable.Empty>()); + var testData = new MapPointData(Enumerable.Empty()); var mapView = TypeUtils.GetField(map, "map"); // Call @@ -90,7 +90,7 @@ { // Setup var map = new BaseMap(); - var testData = new MapPointData(Enumerable.Empty>()); + var testData = new MapPointData(Enumerable.Empty()); var mapView = TypeUtils.GetField(map, "map"); map.Data = testData; Index: Core/Components/test/Core.Components.DotSpatial.Forms.Test/Core.Components.DotSpatial.Forms.Test.csproj =================================================================== diff -u -rae34e25064174cb82307bbd514ef3d37bf49586b -r33c64ea2cd6b287bf5954e63a548d89dadb7f153 --- Core/Components/test/Core.Components.DotSpatial.Forms.Test/Core.Components.DotSpatial.Forms.Test.csproj (.../Core.Components.DotSpatial.Forms.Test.csproj) (revision ae34e25064174cb82307bbd514ef3d37bf49586b) +++ Core/Components/test/Core.Components.DotSpatial.Forms.Test/Core.Components.DotSpatial.Forms.Test.csproj (.../Core.Components.DotSpatial.Forms.Test.csproj) (revision 33c64ea2cd6b287bf5954e63a548d89dadb7f153) @@ -97,6 +97,10 @@ + + {3BBFD65B-B277-4E50-AE6D-BD24C3434609} + Core.Common.Base + {f49bd8b2-332a-4c91-a196-8cce0a2c7d98} Core.Common.Utils Index: Core/Components/test/Core.Components.DotSpatial.Test/Converter/MapDataCollectionConverterTest.cs =================================================================== diff -u -ra3c8c0cb4384de51a18d77cc7bea487f97ba21e1 -r33c64ea2cd6b287bf5954e63a548d89dadb7f153 --- Core/Components/test/Core.Components.DotSpatial.Test/Converter/MapDataCollectionConverterTest.cs (.../MapDataCollectionConverterTest.cs) (revision a3c8c0cb4384de51a18d77cc7bea487f97ba21e1) +++ Core/Components/test/Core.Components.DotSpatial.Test/Converter/MapDataCollectionConverterTest.cs (.../MapDataCollectionConverterTest.cs) (revision 33c64ea2cd6b287bf5954e63a548d89dadb7f153) @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Collections.ObjectModel; +using Core.Common.Base.Geometry; using Core.Common.TestUtil; using Core.Components.DotSpatial.Converter; using Core.Components.DotSpatial.TestUtil; @@ -91,13 +92,13 @@ var converter = new MapDataCollectionConverter(); var random = new Random(21); var randomCount = random.Next(5, 10); - var points = new Collection>(); - var linePoints = new Collection>(); + var points = new Collection(); + var linePoints = new Collection(); for (int i = 0; i < randomCount; i++) { - points.Add(Tuple.Create(random.NextDouble(), random.NextDouble())); - linePoints.Add(Tuple.Create(random.NextDouble(), random.NextDouble())); + points.Add(new Point2D(random.NextDouble(), random.NextDouble())); + linePoints.Add(new Point2D(random.NextDouble(), random.NextDouble())); } var collectionData = new MapDataCollection(new List()); Index: Core/Components/test/Core.Components.DotSpatial.Test/Converter/MapDataFactoryTest.cs =================================================================== diff -u -ra3c8c0cb4384de51a18d77cc7bea487f97ba21e1 -r33c64ea2cd6b287bf5954e63a548d89dadb7f153 --- Core/Components/test/Core.Components.DotSpatial.Test/Converter/MapDataFactoryTest.cs (.../MapDataFactoryTest.cs) (revision a3c8c0cb4384de51a18d77cc7bea487f97ba21e1) +++ Core/Components/test/Core.Components.DotSpatial.Test/Converter/MapDataFactoryTest.cs (.../MapDataFactoryTest.cs) (revision 33c64ea2cd6b287bf5954e63a548d89dadb7f153) @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Collections.ObjectModel; +using Core.Common.Base.Geometry; using Core.Components.DotSpatial.Converter; using Core.Components.DotSpatial.TestUtil; using Core.Components.Gis.Data; @@ -124,13 +125,13 @@ Assert.Throws(test); } - private static Collection> CreateTestData() + private static Collection CreateTestData() { - return new Collection> + return new Collection { - Tuple.Create(1.2, 3.4), - Tuple.Create(3.2, 3.4), - Tuple.Create(0.2, 2.4) + new Point2D(1.2, 3.4), + new Point2D(3.2, 3.4), + new Point2D(0.2, 2.4) }; } } Index: Core/Components/test/Core.Components.DotSpatial.Test/Converter/MapLineDataConverterTest.cs =================================================================== diff -u -ra3c8c0cb4384de51a18d77cc7bea487f97ba21e1 -r33c64ea2cd6b287bf5954e63a548d89dadb7f153 --- Core/Components/test/Core.Components.DotSpatial.Test/Converter/MapLineDataConverterTest.cs (.../MapLineDataConverterTest.cs) (revision a3c8c0cb4384de51a18d77cc7bea487f97ba21e1) +++ Core/Components/test/Core.Components.DotSpatial.Test/Converter/MapLineDataConverterTest.cs (.../MapLineDataConverterTest.cs) (revision 33c64ea2cd6b287bf5954e63a548d89dadb7f153) @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Collections.ObjectModel; +using Core.Common.Base.Geometry; using Core.Common.TestUtil; using Core.Components.DotSpatial.Converter; using Core.Components.DotSpatial.TestUtil; @@ -30,7 +31,7 @@ { // Setup var converter = new MapLineDataConverter(); - var lineData = new MapLineData(new Collection>()); + var lineData = new MapLineData(new Collection()); // Call var canConvert = converter.CanConvertMapData(lineData); @@ -91,11 +92,11 @@ var converter = new MapLineDataConverter(); var random = new Random(21); var randomCount = random.Next(5, 10); - var points = new Collection>(); + var points = new Collection(); for (int i = 0; i < randomCount; i++) { - points.Add(Tuple.Create(random.NextDouble(), random.NextDouble())); + points.Add(new Point2D(random.NextDouble(), random.NextDouble())); } var lineData = new MapLineData(points); Index: Core/Components/test/Core.Components.DotSpatial.Test/Converter/MapPointDataConverterTest.cs =================================================================== diff -u -ra3c8c0cb4384de51a18d77cc7bea487f97ba21e1 -r33c64ea2cd6b287bf5954e63a548d89dadb7f153 --- Core/Components/test/Core.Components.DotSpatial.Test/Converter/MapPointDataConverterTest.cs (.../MapPointDataConverterTest.cs) (revision a3c8c0cb4384de51a18d77cc7bea487f97ba21e1) +++ Core/Components/test/Core.Components.DotSpatial.Test/Converter/MapPointDataConverterTest.cs (.../MapPointDataConverterTest.cs) (revision 33c64ea2cd6b287bf5954e63a548d89dadb7f153) @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; +using Core.Common.Base.Geometry; using Core.Common.TestUtil; using Core.Components.DotSpatial.Converter; using Core.Components.DotSpatial.TestUtil; @@ -31,7 +32,7 @@ { // Setup var converter = new MapPointDataConverter(); - var pointData = new MapPointData(new Collection>()); + var pointData = new MapPointData(new Collection()); // Call var canConvert = converter.CanConvertMapData(pointData); @@ -61,11 +62,11 @@ var converter = new MapPointDataConverter(); var random = new Random(21); var randomCount = random.Next(5, 10); - var points = new Collection>(); + var points = new Collection(); for (int i = 0; i < randomCount; i++) { - points.Add(Tuple.Create(random.NextDouble(), random.NextDouble())); + points.Add(new Point2D(random.NextDouble(), random.NextDouble())); } var pointData = new MapPointData(points); Index: Core/Components/test/Core.Components.DotSpatial.Test/Converter/MapPolygonDataConverterTest.cs =================================================================== diff -u -ra3c8c0cb4384de51a18d77cc7bea487f97ba21e1 -r33c64ea2cd6b287bf5954e63a548d89dadb7f153 --- Core/Components/test/Core.Components.DotSpatial.Test/Converter/MapPolygonDataConverterTest.cs (.../MapPolygonDataConverterTest.cs) (revision a3c8c0cb4384de51a18d77cc7bea487f97ba21e1) +++ Core/Components/test/Core.Components.DotSpatial.Test/Converter/MapPolygonDataConverterTest.cs (.../MapPolygonDataConverterTest.cs) (revision 33c64ea2cd6b287bf5954e63a548d89dadb7f153) @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Collections.ObjectModel; +using Core.Common.Base.Geometry; using Core.Common.TestUtil; using Core.Components.DotSpatial.Converter; using Core.Components.DotSpatial.TestUtil; @@ -30,7 +31,7 @@ { // Setup var converter = new MapPolygonDataConverter(); - var polygonData = new MapPolygonData(new Collection>()); + var polygonData = new MapPolygonData(new Collection()); // Call var canConvert = converter.CanConvertMapData(polygonData); @@ -60,11 +61,11 @@ var converter = new MapPolygonDataConverter(); var random = new Random(21); var randomCount = random.Next(5, 10); - var polygonPoints = new Collection>(); + var polygonPoints = new Collection(); for (int i = 0; i < randomCount; i++) { - polygonPoints.Add(Tuple.Create(random.NextDouble(), random.NextDouble())); + polygonPoints.Add(new Point2D(random.NextDouble(), random.NextDouble())); } var polygonData = new MapPolygonData(polygonPoints); Index: Core/Components/test/Core.Components.DotSpatial.Test/Core.Components.DotSpatial.Test.csproj =================================================================== diff -u -rae34e25064174cb82307bbd514ef3d37bf49586b -r33c64ea2cd6b287bf5954e63a548d89dadb7f153 --- Core/Components/test/Core.Components.DotSpatial.Test/Core.Components.DotSpatial.Test.csproj (.../Core.Components.DotSpatial.Test.csproj) (revision ae34e25064174cb82307bbd514ef3d37bf49586b) +++ Core/Components/test/Core.Components.DotSpatial.Test/Core.Components.DotSpatial.Test.csproj (.../Core.Components.DotSpatial.Test.csproj) (revision 33c64ea2cd6b287bf5954e63a548d89dadb7f153) @@ -76,6 +76,10 @@ + + {3BBFD65B-B277-4E50-AE6D-BD24C3434609} + Core.Common.Base + {D749EE4C-CE50-4C17-BF01-9A953028C126} Core.Common.TestUtil Index: Core/Components/test/Core.Components.Gis.IO.Test/Core.Components.Gis.IO.Test.csproj =================================================================== diff -u -rcd709418712e8fa50e2e8a0da0e2488139ac9054 -r33c64ea2cd6b287bf5954e63a548d89dadb7f153 --- Core/Components/test/Core.Components.Gis.IO.Test/Core.Components.Gis.IO.Test.csproj (.../Core.Components.Gis.IO.Test.csproj) (revision cd709418712e8fa50e2e8a0da0e2488139ac9054) +++ Core/Components/test/Core.Components.Gis.IO.Test/Core.Components.Gis.IO.Test.csproj (.../Core.Components.Gis.IO.Test.csproj) (revision 33c64ea2cd6b287bf5954e63a548d89dadb7f153) @@ -65,6 +65,10 @@ + + {3bbfd65b-b277-4e50-ae6d-bd24c3434609} + Core.Common.Base + {e344867e-9ac9-44c8-88a5-8185681679a9} Core.Common.IO Index: Core/Components/test/Core.Components.Gis.IO.Test/PolylineShapeFileReaderTest.cs =================================================================== diff -u -ra3c8c0cb4384de51a18d77cc7bea487f97ba21e1 -r33c64ea2cd6b287bf5954e63a548d89dadb7f153 --- Core/Components/test/Core.Components.Gis.IO.Test/PolylineShapeFileReaderTest.cs (.../PolylineShapeFileReaderTest.cs) (revision a3c8c0cb4384de51a18d77cc7bea487f97ba21e1) +++ Core/Components/test/Core.Components.Gis.IO.Test/PolylineShapeFileReaderTest.cs (.../PolylineShapeFileReaderTest.cs) (revision 33c64ea2cd6b287bf5954e63a548d89dadb7f153) @@ -177,8 +177,8 @@ // Assert var points = line.Points.ToArray(); Assert.AreEqual(1669, points.Length); - Assert.AreEqual(202714.219, points[457].Item1, 1e-6); - Assert.AreEqual(507775.781, points[457].Item2, 1e-6); + Assert.AreEqual(202714.219, points[457].X, 1e-6); + Assert.AreEqual(507775.781, points[457].Y, 1e-6); Assert.AreEqual(6, line.MetaData.Count); Assert.AreEqual("A", line.MetaData["CATEGORIE"]); @@ -213,8 +213,8 @@ var line1Points = line1.Points.ToArray(); Assert.AreEqual(15, line1Points.Length); - Assert.AreEqual(-1.514151, line1Points[2].Item1, 1e-6); - Assert.AreEqual(-0.879717, line1Points[2].Item2, 1e-6); + Assert.AreEqual(-1.514151, line1Points[2].X, 1e-6); + Assert.AreEqual(-0.879717, line1Points[2].Y, 1e-6); Assert.AreEqual(1, line1.MetaData.Count); Assert.AreEqual(4, line1.MetaData["id"]); @@ -225,8 +225,8 @@ var line2Points = line2.Points.ToArray(); Assert.AreEqual(6, line2Points.Length); - Assert.AreEqual(-2.028302, line2Points[3].Item1, 1e-6); - Assert.AreEqual(-0.382075, line2Points[3].Item2, 1e-6); + Assert.AreEqual(-2.028302, line2Points[3].X, 1e-6); + Assert.AreEqual(-0.382075, line2Points[3].Y, 1e-6); Assert.AreEqual(1, line2.MetaData.Count); Assert.AreEqual(3, line2.MetaData["id"]); @@ -237,8 +237,8 @@ var line3Points = line3.Points.ToArray(); Assert.AreEqual(13, line3Points.Length); - Assert.AreEqual(0.891509, line3Points[12].Item1, 1e-6); - Assert.AreEqual(-0.122641, line3Points[12].Item2, 1e-6); + Assert.AreEqual(0.891509, line3Points[12].X, 1e-6); + Assert.AreEqual(-0.122641, line3Points[12].Y, 1e-6); Assert.AreEqual(1, line3.MetaData.Count); Assert.AreEqual(2, line3.MetaData["id"]); @@ -249,8 +249,8 @@ var line4Points = line4.Points.ToArray(); Assert.AreEqual(6, line4Points.Length); - Assert.AreEqual(-2.070754, line4Points[0].Item1, 1e-6); - Assert.AreEqual(0.73584906, line4Points[0].Item2, 1e-6); + Assert.AreEqual(-2.070754, line4Points[0].X, 1e-6); + Assert.AreEqual(0.73584906, line4Points[0].Y, 1e-6); Assert.AreEqual(1, line4.MetaData.Count); Assert.AreEqual(1, line4.MetaData["id"]); Index: Core/Components/test/Core.Components.Gis.Test/Core.Components.Gis.Test.csproj =================================================================== diff -u -ra3c8c0cb4384de51a18d77cc7bea487f97ba21e1 -r33c64ea2cd6b287bf5954e63a548d89dadb7f153 --- Core/Components/test/Core.Components.Gis.Test/Core.Components.Gis.Test.csproj (.../Core.Components.Gis.Test.csproj) (revision a3c8c0cb4384de51a18d77cc7bea487f97ba21e1) +++ Core/Components/test/Core.Components.Gis.Test/Core.Components.Gis.Test.csproj (.../Core.Components.Gis.Test.csproj) (revision 33c64ea2cd6b287bf5954e63a548d89dadb7f153) @@ -52,6 +52,10 @@ + + {3bbfd65b-b277-4e50-ae6d-bd24c3434609} + Core.Common.Base + {d749ee4c-ce50-4c17-bf01-9a953028c126} Core.Common.TestUtil Index: Core/Components/test/Core.Components.Gis.Test/Data/MapLineDataTest.cs =================================================================== diff -u -ra3c8c0cb4384de51a18d77cc7bea487f97ba21e1 -r33c64ea2cd6b287bf5954e63a548d89dadb7f153 --- Core/Components/test/Core.Components.Gis.Test/Data/MapLineDataTest.cs (.../MapLineDataTest.cs) (revision a3c8c0cb4384de51a18d77cc7bea487f97ba21e1) +++ Core/Components/test/Core.Components.Gis.Test/Data/MapLineDataTest.cs (.../MapLineDataTest.cs) (revision 33c64ea2cd6b287bf5954e63a548d89dadb7f153) @@ -1,7 +1,7 @@ using System; using System.Collections.ObjectModel; using System.Linq; - +using Core.Common.Base.Geometry; using Core.Common.TestUtil; using Core.Components.Gis.Data; @@ -26,7 +26,7 @@ public void Constructor_WithEmptyPoints_CreatesNewMapLineData() { // Setup - var points = new Collection>(); + var points = new Collection(); // Call var data = new MapLineData(points); @@ -57,7 +57,7 @@ public void MetaData_SetNewValue_GetNewlySetValue() { // Setup - var data = new MapLineData(Enumerable.Empty>()); + var data = new MapLineData(Enumerable.Empty()); const string key = ""; var newValue = new object(); @@ -69,13 +69,13 @@ Assert.AreEqual(newValue, data.MetaData[key]); } - private static Collection> CreateTestPoints() + private static Collection CreateTestPoints() { - return new Collection> + return new Collection { - Tuple.Create(0.0, 1.1), - Tuple.Create(1.0, 2.1), - Tuple.Create(1.6, 1.6) + new Point2D(0.0, 1.1), + new Point2D(1.0, 2.1), + new Point2D(1.6, 1.6) }; } } Index: Core/Components/test/Core.Components.Gis.Test/Data/MapPointDataTest.cs =================================================================== diff -u -ra3c8c0cb4384de51a18d77cc7bea487f97ba21e1 -r33c64ea2cd6b287bf5954e63a548d89dadb7f153 --- Core/Components/test/Core.Components.Gis.Test/Data/MapPointDataTest.cs (.../MapPointDataTest.cs) (revision a3c8c0cb4384de51a18d77cc7bea487f97ba21e1) +++ Core/Components/test/Core.Components.Gis.Test/Data/MapPointDataTest.cs (.../MapPointDataTest.cs) (revision 33c64ea2cd6b287bf5954e63a548d89dadb7f153) @@ -1,6 +1,6 @@ using System; using System.Collections.ObjectModel; - +using Core.Common.Base.Geometry; using Core.Common.TestUtil; using Core.Components.Gis.Data; @@ -25,7 +25,7 @@ public void Constructor_WithEmptyPoints_CreatesNewMapPointData() { // Setup - var points = new Collection>(); + var points = new Collection(); // Call var data = new MapPointData(points); @@ -50,13 +50,13 @@ CollectionAssert.AreEqual(points, data.Points); } - private Collection> CreateTestPoints() + private Collection CreateTestPoints() { - return new Collection> + return new Collection { - Tuple.Create(0.0, 1.1), - Tuple.Create(1.0, 2.1), - Tuple.Create(1.6, 1.6) + new Point2D(0.0, 1.1), + new Point2D(1.0, 2.1), + new Point2D(1.6, 1.6) }; } } Index: Core/Components/test/Core.Components.Gis.Test/Data/MapPolygonDataTest.cs =================================================================== diff -u -ra3c8c0cb4384de51a18d77cc7bea487f97ba21e1 -r33c64ea2cd6b287bf5954e63a548d89dadb7f153 --- Core/Components/test/Core.Components.Gis.Test/Data/MapPolygonDataTest.cs (.../MapPolygonDataTest.cs) (revision a3c8c0cb4384de51a18d77cc7bea487f97ba21e1) +++ Core/Components/test/Core.Components.Gis.Test/Data/MapPolygonDataTest.cs (.../MapPolygonDataTest.cs) (revision 33c64ea2cd6b287bf5954e63a548d89dadb7f153) @@ -1,6 +1,6 @@ using System; using System.Collections.ObjectModel; - +using Core.Common.Base.Geometry; using Core.Common.TestUtil; using Core.Components.Gis.Data; @@ -25,7 +25,7 @@ public void Constructor_WithEmptyPoints_CreatesNewMapPolygonData() { // Setup - var points = new Collection>(); + var points = new Collection(); // Call var data = new MapPolygonData(points); @@ -50,13 +50,13 @@ CollectionAssert.AreEqual(points, data.Points); } - private static Collection> CreateTestPoints() + private static Collection CreateTestPoints() { - return new Collection> + return new Collection { - Tuple.Create(0.0, 1.1), - Tuple.Create(1.0, 2.1), - Tuple.Create(1.6, 1.6) + new Point2D(0.0, 1.1), + new Point2D(1.0, 2.1), + new Point2D(1.6, 1.6) }; } } Index: Core/Components/test/Core.Components.Gis.Test/Data/PointsBasedMapDataTest.cs =================================================================== diff -u -rf612f81e3d6435ddd1a9c571738aab54e6048a9e -r33c64ea2cd6b287bf5954e63a548d89dadb7f153 --- Core/Components/test/Core.Components.Gis.Test/Data/PointsBasedMapDataTest.cs (.../PointsBasedMapDataTest.cs) (revision f612f81e3d6435ddd1a9c571738aab54e6048a9e) +++ Core/Components/test/Core.Components.Gis.Test/Data/PointsBasedMapDataTest.cs (.../PointsBasedMapDataTest.cs) (revision 33c64ea2cd6b287bf5954e63a548d89dadb7f153) @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; using System.Collections.ObjectModel; - +using Core.Common.Base.Geometry; using Core.Common.TestUtil; using Core.Components.Gis.Data; @@ -27,10 +27,10 @@ public void Constructor_WithPoints_PropertiesSet() { // Setup - var points = new Collection> + var points = new Collection { - Tuple.Create(0.0, 1.0), - Tuple.Create(2.5, 1.1) + new Point2D(0.0, 1.0), + new Point2D(2.5, 1.1) }; // Call @@ -44,7 +44,7 @@ private class TestPointBasedMapData : PointBasedMapData { - public TestPointBasedMapData(IEnumerable> points) : base(points) {} + public TestPointBasedMapData(IEnumerable points) : base(points) { } } } } \ No newline at end of file Index: Core/Plugins/test/Core.Plugins.DotSpatial.Test/Forms/MapDataViewTest.cs =================================================================== diff -u -ra3c8c0cb4384de51a18d77cc7bea487f97ba21e1 -r33c64ea2cd6b287bf5954e63a548d89dadb7f153 --- Core/Plugins/test/Core.Plugins.DotSpatial.Test/Forms/MapDataViewTest.cs (.../MapDataViewTest.cs) (revision a3c8c0cb4384de51a18d77cc7bea487f97ba21e1) +++ Core/Plugins/test/Core.Plugins.DotSpatial.Test/Forms/MapDataViewTest.cs (.../MapDataViewTest.cs) (revision 33c64ea2cd6b287bf5954e63a548d89dadb7f153) @@ -1,6 +1,7 @@ using System; using System.Linq; using System.Windows.Forms; +using Core.Common.Base.Geometry; using Core.Common.Controls.Views; using Core.Components.DotSpatial.Forms; using Core.Components.Gis.Data; @@ -73,7 +74,7 @@ // Setup var mapView = new MapDataView(); var map = (BaseMap) mapView.Controls[0]; - var pointData = new MapPointData(Enumerable.Empty>()); + var pointData = new MapPointData(Enumerable.Empty()); // Call mapView.Data = pointData; Index: Demo/Ringtoets/src/Demo.Ringtoets/Commands/OpenMapViewCommand.cs =================================================================== diff -u -ra3c8c0cb4384de51a18d77cc7bea487f97ba21e1 -r33c64ea2cd6b287bf5954e63a548d89dadb7f153 --- Demo/Ringtoets/src/Demo.Ringtoets/Commands/OpenMapViewCommand.cs (.../OpenMapViewCommand.cs) (revision a3c8c0cb4384de51a18d77cc7bea487f97ba21e1) +++ Demo/Ringtoets/src/Demo.Ringtoets/Commands/OpenMapViewCommand.cs (.../OpenMapViewCommand.cs) (revision 33c64ea2cd6b287bf5954e63a548d89dadb7f153) @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Collections.ObjectModel; +using Core.Common.Base.Geometry; using Core.Common.Controls.Commands; using Core.Common.Gui; using Core.Components.Gis.Data; @@ -41,23 +42,23 @@ public void Execute(params object[] arguments) { - var points = new MapPointData(new Collection> + var points = new MapPointData(new Collection { - Tuple.Create(1.5, 2.0), - Tuple.Create(1.1, 1.0), - Tuple.Create(0.8, 0.5) + new Point2D(1.5, 2), + new Point2D(1.1, 1), + new Point2D(0.8, 0.5) }); - var lines = new MapLineData(new Collection> + var lines = new MapLineData(new Collection { - Tuple.Create(0.0, 1.1), - Tuple.Create(1.0, 2.1), - Tuple.Create(1.6, 1.6) + new Point2D(0.0, 1.1), + new Point2D(1.0, 2.1), + new Point2D(1.6, 1.6) }); - var polygons = new MapPolygonData(new Collection> + var polygons = new MapPolygonData(new Collection { - Tuple.Create(1.0, 1.3), - Tuple.Create(3.0, 2.6), - Tuple.Create(5.6, 1.6) + new Point2D(1.0, 1.3), + new Point2D(3.0, 2.6), + new Point2D(5.6, 1.6) }); documentViewController.DocumentViewsResolver.OpenViewForData(new MapDataCollection(new List { points, lines, polygons })); Index: Ringtoets/Common/src/Ringtoets.Common.IO/ReferenceLineReader.cs =================================================================== diff -u -ra3c8c0cb4384de51a18d77cc7bea487f97ba21e1 -r33c64ea2cd6b287bf5954e63a548d89dadb7f153 --- Ringtoets/Common/src/Ringtoets.Common.IO/ReferenceLineReader.cs (.../ReferenceLineReader.cs) (revision a3c8c0cb4384de51a18d77cc7bea487f97ba21e1) +++ Ringtoets/Common/src/Ringtoets.Common.IO/ReferenceLineReader.cs (.../ReferenceLineReader.cs) (revision 33c64ea2cd6b287bf5954e63a548d89dadb7f153) @@ -129,7 +129,7 @@ private static ReferenceLine CreateReferenceLine(MapLineData lineMapData) { var referenceLine = new ReferenceLine(); - referenceLine.SetGeometry(lineMapData.Points.Select(t => new Point2D(t.Item1, t.Item2))); + referenceLine.SetGeometry(lineMapData.Points.Select(t => new Point2D(t.X, t.Y))); return referenceLine; } } Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Data/HydraulicBoundaryDatabase.cs =================================================================== diff -u -rc6dd26c14af11a7e13f783f578466e46b463165a -r33c64ea2cd6b287bf5954e63a548d89dadb7f153 --- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Data/HydraulicBoundaryDatabase.cs (.../HydraulicBoundaryDatabase.cs) (revision c6dd26c14af11a7e13f783f578466e46b463165a) +++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Data/HydraulicBoundaryDatabase.cs (.../HydraulicBoundaryDatabase.cs) (revision 33c64ea2cd6b287bf5954e63a548d89dadb7f153) @@ -51,6 +51,6 @@ /// /// Gets the hydraulic boundary locations. /// - public IEnumerable Locations { get; private set; } + public ICollection Locations { get; private set; } } } \ No newline at end of file Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Data.Test/HydraulicBoundaryDatabaseTest.cs =================================================================== diff -u -rc6dd26c14af11a7e13f783f578466e46b463165a -r33c64ea2cd6b287bf5954e63a548d89dadb7f153 --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Data.Test/HydraulicBoundaryDatabaseTest.cs (.../HydraulicBoundaryDatabaseTest.cs) (revision c6dd26c14af11a7e13f783f578466e46b463165a) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Data.Test/HydraulicBoundaryDatabaseTest.cs (.../HydraulicBoundaryDatabaseTest.cs) (revision 33c64ea2cd6b287bf5954e63a548d89dadb7f153) @@ -29,11 +29,10 @@ [Test] public void Constructor_DefaultConstructor_ExpectedValues() { - // Setup & call + // Call HydraulicBoundaryDatabase hydraulicBoundaryDatabase = new HydraulicBoundaryDatabase(); // Assert - // Call Assert.IsNullOrEmpty(null, hydraulicBoundaryDatabase.FilePath); Assert.IsNullOrEmpty(null, hydraulicBoundaryDatabase.Version); Assert.IsInstanceOf>(hydraulicBoundaryDatabase.Locations); Index: Ringtoets/Integration/src/Ringtoets.Integration.Data/AssessmentSectionBase.cs =================================================================== diff -u -racbd08302b69fc06e5cade26def0dea4d35e3b92 -r33c64ea2cd6b287bf5954e63a548d89dadb7f153 --- Ringtoets/Integration/src/Ringtoets.Integration.Data/AssessmentSectionBase.cs (.../AssessmentSectionBase.cs) (revision acbd08302b69fc06e5cade26def0dea4d35e3b92) +++ Ringtoets/Integration/src/Ringtoets.Integration.Data/AssessmentSectionBase.cs (.../AssessmentSectionBase.cs) (revision 33c64ea2cd6b287bf5954e63a548d89dadb7f153) @@ -23,7 +23,6 @@ using Core.Common.Base; using Core.Common.Base.Storage; -using Core.Components.Gis.Data; using Ringtoets.Common.Data; using Ringtoets.HydraRing.Data; using Ringtoets.Integration.Data.Contribution; Index: Ringtoets/Integration/src/Ringtoets.Integration.Data/Map/AssessmentSectionMapData.cs =================================================================== diff -u -r80f41e842173e15c34c76faa14385b596e7ee34f -r33c64ea2cd6b287bf5954e63a548d89dadb7f153 --- Ringtoets/Integration/src/Ringtoets.Integration.Data/Map/AssessmentSectionMapData.cs (.../AssessmentSectionMapData.cs) (revision 80f41e842173e15c34c76faa14385b596e7ee34f) +++ Ringtoets/Integration/src/Ringtoets.Integration.Data/Map/AssessmentSectionMapData.cs (.../AssessmentSectionMapData.cs) (revision 33c64ea2cd6b287bf5954e63a548d89dadb7f153) @@ -21,7 +21,8 @@ using System; using System.Collections.Generic; -using Core.Common.Base; +using System.Linq; +using Core.Common.Base.Geometry; using Core.Components.Gis.Data; namespace Ringtoets.Integration.Data.Map @@ -45,8 +46,19 @@ throw new ArgumentNullException("assessmentSection"); } this.assessmentSection = assessmentSection; + + var locationData = assessmentSection.HydraulicBoundaryDatabase.Locations.Select(hydraulicBoundaryLocation => hydraulicBoundaryLocation.Location).ToList(); + if (locationData.Count > 0) + { + CreateMapPointData(locationData); + } } + private void CreateMapPointData(IEnumerable locationData) + { + List.Add(new MapPointData(locationData)); + } + public override bool Equals(object other) { return Equals(other as AssessmentSectionMapData); Index: Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/Map/AssessmentSectionMapDataTest.cs =================================================================== diff -u -racbd08302b69fc06e5cade26def0dea4d35e3b92 -r33c64ea2cd6b287bf5954e63a548d89dadb7f153 --- Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/Map/AssessmentSectionMapDataTest.cs (.../AssessmentSectionMapDataTest.cs) (revision acbd08302b69fc06e5cade26def0dea4d35e3b92) +++ Ringtoets/Integration/test/Ringtoets.Integration.Data.Test/Map/AssessmentSectionMapDataTest.cs (.../AssessmentSectionMapDataTest.cs) (revision 33c64ea2cd6b287bf5954e63a548d89dadb7f153) @@ -20,9 +20,12 @@ // All rights reserved. using System; +using System.Collections.Generic; using Core.Components.Gis.Data; using NUnit.Framework; using Rhino.Mocks; +using Ringtoets.Common.Data; +using Ringtoets.HydraRing.Data; using Ringtoets.Integration.Data.Map; namespace Ringtoets.Integration.Data.Test.Map @@ -44,11 +47,39 @@ // Assert Assert.IsInstanceOf(mapData); Assert.IsInstanceOf>(mapData); - CollectionAssert.IsEmpty(mapData.List); mocks.VerifyAll(); } [Test] + public void Constructor_NoHydraulicDatabaseLocationsSet_NoLayerAddedToMap() + { + // Setup + var assessmentSection = new TestAssessmentSectionBase(); + + // Call + var mapData = new AssessmentSectionMapData(assessmentSection); + + // Assert + CollectionAssert.IsEmpty(mapData.List); + } + + [Test] + public void Constructor_HydraulicDatabaseLocationsSet_AddsLayerToMap() + { + // Setup + var assessmentSection = new TestAssessmentSectionBase(); + + assessmentSection.HydraulicBoundaryDatabase.Locations.Add(new HydraulicBoundaryLocation(1, "test", 1.0, 1.1)); + assessmentSection.HydraulicBoundaryDatabase.Locations.Add(new HydraulicBoundaryLocation(2, "test2", 2.0, 1.4)); + + // Call + var mapData = new AssessmentSectionMapData(assessmentSection); + + // Assert + Assert.AreEqual(1, mapData.List.Count); + } + + [Test] public void Constructor_AssessmentSectionIsNull_ThrowArgumentNullException() { // Call @@ -152,7 +183,6 @@ Assert.IsFalse(isEqual2); } - [Test] public void GetHashCode_TwoEqualAssessmentSectionMapDataInstances_ReturnSameHash() { @@ -171,5 +201,13 @@ // Assert Assert.AreEqual(hash1, hash2); } + + private class TestAssessmentSectionBase : AssessmentSectionBase + { + public override IEnumerable GetFailureMechanisms() + { + yield break; + } + } } } \ No newline at end of file