Index: Core/Components/src/Core.Components.DotSpatial.Forms/Core.Components.DotSpatial.Forms.csproj =================================================================== diff -u -r7cc1fd960a912443ccc3c6995eccb5673d1d8d22 -rc6ae22bb8ea36b96be9f859f3348b68c57d4b479 --- Core/Components/src/Core.Components.DotSpatial.Forms/Core.Components.DotSpatial.Forms.csproj (.../Core.Components.DotSpatial.Forms.csproj) (revision 7cc1fd960a912443ccc3c6995eccb5673d1d8d22) +++ Core/Components/src/Core.Components.DotSpatial.Forms/Core.Components.DotSpatial.Forms.csproj (.../Core.Components.DotSpatial.Forms.csproj) (revision c6ae22bb8ea36b96be9f859f3348b68c57d4b479) @@ -46,6 +46,10 @@ False ..\..\..\..\lib\DotSpatial.1.8\DotSpatial.Extensions.dll + + False + ..\..\..\..\..\Clean_WTI2017\lib\DotSpatial.1.8\DotSpatial.Projections.dll + False ..\..\..\..\lib\DotSpatial.1.8\DotSpatial.Symbology.dll Index: Core/Components/src/Core.Components.DotSpatial.Forms/MapControl.cs =================================================================== diff -u -r4faae1433690b9b06b40c18ff322140aa16df739 -rc6ae22bb8ea36b96be9f859f3348b68c57d4b479 --- Core/Components/src/Core.Components.DotSpatial.Forms/MapControl.cs (.../MapControl.cs) (revision 4faae1433690b9b06b40c18ff322140aa16df739) +++ Core/Components/src/Core.Components.DotSpatial.Forms/MapControl.cs (.../MapControl.cs) (revision c6ae22bb8ea36b96be9f859f3348b68c57d4b479) @@ -222,7 +222,8 @@ { ProjectionModeDefine = ActionMode.Never, Dock = DockStyle.Fill, - ZoomOutFartherThanMaxExtent = true + ZoomOutFartherThanMaxExtent = true, + Projection = MapDataConstants.FeatureBasedMapDataCoordinateSystem }; // Configure the map pan function @@ -306,7 +307,7 @@ private void DrawMapData(FeatureBasedMapData featureBasedMapData) { - var featureBasedMapDataLayer = FeatureBasedMapDataLayerFactory.Create(featureBasedMapData); + IFeatureBasedMapDataLayer featureBasedMapDataLayer = FeatureBasedMapDataLayerFactory.Create(featureBasedMapData); var drawnMapData = new DrawnMapData { @@ -321,6 +322,10 @@ drawnMapDataList.Add(drawnMapData); + if (!map.Projection.Equals(featureBasedMapDataLayer.Projection)) + { + featureBasedMapDataLayer.Reproject(map.Projection); + } map.Layers.Add(featureBasedMapDataLayer); } Index: Core/Components/src/Core.Components.DotSpatial/Converter/FeatureBasedMapDataConverter.cs =================================================================== diff -u -rb2b9fdf365e70928a05c57966eeed30d9050e528 -rc6ae22bb8ea36b96be9f859f3348b68c57d4b479 --- Core/Components/src/Core.Components.DotSpatial/Converter/FeatureBasedMapDataConverter.cs (.../FeatureBasedMapDataConverter.cs) (revision b2b9fdf365e70928a05c57966eeed30d9050e528) +++ Core/Components/src/Core.Components.DotSpatial/Converter/FeatureBasedMapDataConverter.cs (.../FeatureBasedMapDataConverter.cs) (revision c6ae22bb8ea36b96be9f859f3348b68c57d4b479) @@ -29,6 +29,7 @@ using Core.Components.Gis.Features; using DotSpatial.Controls; using DotSpatial.Data; +using DotSpatial.Projections; using DotSpatial.Symbology; using DotSpatial.Topology; @@ -56,8 +57,13 @@ ClearLayerData(layer); SetDataTableColumns(data.MetaData, layer); - var attributeMapping = GetAttributeMapping(data); + ProjectionInfo originalLayerProjection = layer.Projection; + if (originalLayerProjection == null || !originalLayerProjection.Equals(MapDataConstants.FeatureBasedMapDataCoordinateSystem)) + { + layer.Projection = MapDataConstants.FeatureBasedMapDataCoordinateSystem; + } + Dictionary attributeMapping = GetAttributeMapping(data); foreach (MapFeature mapFeature in data.Features) { IEnumerable features = CreateFeatures(mapFeature); @@ -67,9 +73,14 @@ AddFeatureToLayer(layer, feature, mapFeature, attributeMapping); } } - layer.DataSet.InitializeVertices(); layer.DataSet.UpdateExtent(); + + if (originalLayerProjection != null && !originalLayerProjection.Equals(MapDataConstants.FeatureBasedMapDataCoordinateSystem)) + { + layer.Reproject(originalLayerProjection); + } + layer.AssignFastDrawnStates(); } @@ -92,7 +103,9 @@ } /// - /// Creates an of based on . + /// Creates an of based on + /// that have been defined in the coordinate system + /// given by . /// /// The to create features for. /// An of . Index: Core/Components/src/Core.Components.DotSpatial/Core.Components.DotSpatial.csproj =================================================================== diff -u -r7cc1fd960a912443ccc3c6995eccb5673d1d8d22 -rc6ae22bb8ea36b96be9f859f3348b68c57d4b479 --- Core/Components/src/Core.Components.DotSpatial/Core.Components.DotSpatial.csproj (.../Core.Components.DotSpatial.csproj) (revision 7cc1fd960a912443ccc3c6995eccb5673d1d8d22) +++ Core/Components/src/Core.Components.DotSpatial/Core.Components.DotSpatial.csproj (.../Core.Components.DotSpatial.csproj) (revision c6ae22bb8ea36b96be9f859f3348b68c57d4b479) @@ -58,7 +58,10 @@ False ..\..\..\..\lib\DotSpatial.1.8\DotSpatial.Extensions.dll - + + False + ..\..\..\..\..\Clean_WTI2017\lib\DotSpatial.1.8\DotSpatial.Projections.dll + False ..\..\..\..\lib\DotSpatial.1.8\DotSpatial.Symbology.dll @@ -111,6 +114,7 @@ + Index: Core/Components/src/Core.Components.DotSpatial/Layer/FeatureBasedMapDataLayerFactory.cs =================================================================== diff -u -r8b36313c9a9136c821c2614762889a63968aa8e6 -rc6ae22bb8ea36b96be9f859f3348b68c57d4b479 --- Core/Components/src/Core.Components.DotSpatial/Layer/FeatureBasedMapDataLayerFactory.cs (.../FeatureBasedMapDataLayerFactory.cs) (revision 8b36313c9a9136c821c2614762889a63968aa8e6) +++ Core/Components/src/Core.Components.DotSpatial/Layer/FeatureBasedMapDataLayerFactory.cs (.../FeatureBasedMapDataLayerFactory.cs) (revision c6ae22bb8ea36b96be9f859f3348b68c57d4b479) @@ -55,7 +55,7 @@ return new MapPolygonDataLayer(mapPolygonData); } - throw new NotSupportedException(string.Format("FeatureBasedMapData of type {0} is not supported.", data.GetType().Name)); + throw new NotSupportedException($"FeatureBasedMapData of type {data.GetType().Name} is not supported."); } } } \ No newline at end of file Index: Core/Components/src/Core.Components.DotSpatial/Layer/MapLineDataLayer.cs =================================================================== diff -u -rb2b9fdf365e70928a05c57966eeed30d9050e528 -rc6ae22bb8ea36b96be9f859f3348b68c57d4b479 --- Core/Components/src/Core.Components.DotSpatial/Layer/MapLineDataLayer.cs (.../MapLineDataLayer.cs) (revision b2b9fdf365e70928a05c57966eeed30d9050e528) +++ Core/Components/src/Core.Components.DotSpatial/Layer/MapLineDataLayer.cs (.../MapLineDataLayer.cs) (revision c6ae22bb8ea36b96be9f859f3348b68c57d4b479) @@ -50,6 +50,7 @@ } this.mapLineData = mapLineData; + Projection = MapDataConstants.FeatureBasedMapDataCoordinateSystem; Update(); } Index: Core/Components/src/Core.Components.DotSpatial/Layer/MapPointDataLayer.cs =================================================================== diff -u -rb2b9fdf365e70928a05c57966eeed30d9050e528 -rc6ae22bb8ea36b96be9f859f3348b68c57d4b479 --- Core/Components/src/Core.Components.DotSpatial/Layer/MapPointDataLayer.cs (.../MapPointDataLayer.cs) (revision b2b9fdf365e70928a05c57966eeed30d9050e528) +++ Core/Components/src/Core.Components.DotSpatial/Layer/MapPointDataLayer.cs (.../MapPointDataLayer.cs) (revision c6ae22bb8ea36b96be9f859f3348b68c57d4b479) @@ -24,6 +24,7 @@ using Core.Components.Gis.Data; using Core.Components.Gis.Features; using DotSpatial.Controls; +using DotSpatial.Projections; namespace Core.Components.DotSpatial.Layer { @@ -50,6 +51,7 @@ } this.mapPointData = mapPointData; + Projection = MapDataConstants.FeatureBasedMapDataCoordinateSystem; Update(); } Index: Core/Components/src/Core.Components.DotSpatial/Layer/MapPolygonDataLayer.cs =================================================================== diff -u -rb2b9fdf365e70928a05c57966eeed30d9050e528 -rc6ae22bb8ea36b96be9f859f3348b68c57d4b479 --- Core/Components/src/Core.Components.DotSpatial/Layer/MapPolygonDataLayer.cs (.../MapPolygonDataLayer.cs) (revision b2b9fdf365e70928a05c57966eeed30d9050e528) +++ Core/Components/src/Core.Components.DotSpatial/Layer/MapPolygonDataLayer.cs (.../MapPolygonDataLayer.cs) (revision c6ae22bb8ea36b96be9f859f3348b68c57d4b479) @@ -50,6 +50,7 @@ } this.mapPolygonData = mapPolygonData; + Projection = MapDataConstants.FeatureBasedMapDataCoordinateSystem; Update(); } Index: Core/Components/src/Core.Components.DotSpatial/MapDataConstants.cs =================================================================== diff -u --- Core/Components/src/Core.Components.DotSpatial/MapDataConstants.cs (revision 0) +++ Core/Components/src/Core.Components.DotSpatial/MapDataConstants.cs (revision c6ae22bb8ea36b96be9f859f3348b68c57d4b479) @@ -0,0 +1,44 @@ +// Copyright (C) Stichting Deltares 2016. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using Core.Components.Gis.Data; +using DotSpatial.Projections; + +namespace Core.Components.DotSpatial +{ + /// + /// Constants for dealing with and its derivatives. + /// + public static class MapDataConstants + { + /// + /// Denotes the coordinate system in which have + /// defined their geometry. + /// + public static ProjectionInfo FeatureBasedMapDataCoordinateSystem + { + get + { + return KnownCoordinateSystems.Projected.NationalGrids.Rijksdriehoekstelsel; + } + } + } +} \ No newline at end of file Index: Core/Components/src/Core.Components.Gis/Data/FeatureBasedMapData.cs =================================================================== diff -u -rb2b9fdf365e70928a05c57966eeed30d9050e528 -rc6ae22bb8ea36b96be9f859f3348b68c57d4b479 --- Core/Components/src/Core.Components.Gis/Data/FeatureBasedMapData.cs (.../FeatureBasedMapData.cs) (revision b2b9fdf365e70928a05c57966eeed30d9050e528) +++ Core/Components/src/Core.Components.Gis/Data/FeatureBasedMapData.cs (.../FeatureBasedMapData.cs) (revision c6ae22bb8ea36b96be9f859f3348b68c57d4b479) @@ -28,6 +28,7 @@ { /// /// Base class for which is based on an array of features. + /// The features are defined in the RD-new coordinate system. /// public abstract class FeatureBasedMapData : MapData { @@ -46,10 +47,11 @@ } /// - /// Gets or sets an array of features. + /// Gets or sets an array of features defined in the RD-new coordinate system. /// - /// Calls and so can throw all corresponding exceptions. - /// This collection will not contain null elements. + /// Calls when setting a new array and so + /// can throw all corresponding exceptions. This collection will not contain null + /// elements. public MapFeature[] Features { get Index: Core/Components/src/Core.Components.Gis/Features/MapFeature.cs =================================================================== diff -u -rb2b9fdf365e70928a05c57966eeed30d9050e528 -rc6ae22bb8ea36b96be9f859f3348b68c57d4b479 --- Core/Components/src/Core.Components.Gis/Features/MapFeature.cs (.../MapFeature.cs) (revision b2b9fdf365e70928a05c57966eeed30d9050e528) +++ Core/Components/src/Core.Components.Gis/Features/MapFeature.cs (.../MapFeature.cs) (revision c6ae22bb8ea36b96be9f859f3348b68c57d4b479) @@ -26,14 +26,16 @@ namespace Core.Components.Gis.Features { /// - /// Features containing an of . + /// Features containing an of + /// defined in the RD-new coordinate system. /// public class MapFeature { /// /// Creates a new instance of . /// - /// An of . + /// An of + /// defined in the RD-new coordinate system. /// Thrown when is null. public MapFeature(IEnumerable mapGeometries) { @@ -47,7 +49,7 @@ } /// - /// Gets the geometries associated with this feature. + /// Gets the geometries defined in the RD-new coordinate system associated with this feature. /// public IEnumerable MapGeometries { get; private set; } Index: Core/Components/src/Core.Components.Gis/Geometries/MapGeometry.cs =================================================================== diff -u -rb2b9fdf365e70928a05c57966eeed30d9050e528 -rc6ae22bb8ea36b96be9f859f3348b68c57d4b479 --- Core/Components/src/Core.Components.Gis/Geometries/MapGeometry.cs (.../MapGeometry.cs) (revision b2b9fdf365e70928a05c57966eeed30d9050e528) +++ Core/Components/src/Core.Components.Gis/Geometries/MapGeometry.cs (.../MapGeometry.cs) (revision c6ae22bb8ea36b96be9f859f3348b68c57d4b479) @@ -26,14 +26,15 @@ namespace Core.Components.Gis.Geometries { /// - /// The geometry containing the points. + /// The geometry containing the points defined in the RD-new coordinate system. /// public class MapGeometry { /// /// Creates a new instance of . /// - /// A sequence of -sequences. + /// A sequence of -sequences + /// that define the geometry in the RD-new coordinate system. /// Thrown when is null. public MapGeometry(IEnumerable> pointCollections) { @@ -45,7 +46,8 @@ } /// - /// Gets the points associated with the . + /// Gets the points associated with the defined in the + /// RD-new coordinate system. /// public IEnumerable> PointCollections { get; private set; } } Index: Core/Components/test/Core.Components.DotSpatial.Forms.Test/Core.Components.DotSpatial.Forms.Test.csproj =================================================================== diff -u -r6a5d7b40b7ba4dcb73e393075338352d194e97c2 -rc6ae22bb8ea36b96be9f859f3348b68c57d4b479 --- Core/Components/test/Core.Components.DotSpatial.Forms.Test/Core.Components.DotSpatial.Forms.Test.csproj (.../Core.Components.DotSpatial.Forms.Test.csproj) (revision 6a5d7b40b7ba4dcb73e393075338352d194e97c2) +++ Core/Components/test/Core.Components.DotSpatial.Forms.Test/Core.Components.DotSpatial.Forms.Test.csproj (.../Core.Components.DotSpatial.Forms.Test.csproj) (revision c6ae22bb8ea36b96be9f859f3348b68c57d4b479) @@ -42,6 +42,10 @@ False ..\..\..\..\lib\DotSpatial.1.8\DotSpatial.Data.dll + + False + ..\..\..\..\..\Clean_WTI2017\lib\DotSpatial.1.8\DotSpatial.Projections.dll + False ..\..\..\..\lib\DotSpatial.1.8\DotSpatial.Symbology.dll Index: Core/Components/test/Core.Components.DotSpatial.Forms.Test/MapControlTest.cs =================================================================== diff -u -r6a5d7b40b7ba4dcb73e393075338352d194e97c2 -rc6ae22bb8ea36b96be9f859f3348b68c57d4b479 --- Core/Components/test/Core.Components.DotSpatial.Forms.Test/MapControlTest.cs (.../MapControlTest.cs) (revision 6a5d7b40b7ba4dcb73e393075338352d194e97c2) +++ Core/Components/test/Core.Components.DotSpatial.Forms.Test/MapControlTest.cs (.../MapControlTest.cs) (revision c6ae22bb8ea36b96be9f859f3348b68c57d4b479) @@ -62,7 +62,7 @@ [Test] [Apartment(ApartmentState.STA)] - public void DefaultConstructor_MapFunctionsCorrectlyInitialized() + public void DefaultConstructor_MapCorrectlyInitialized() { using (var form = new Form()) { @@ -71,9 +71,12 @@ form.Controls.Add(mapControl); form.Show(); - var map = (Map) new ControlTester("Map").TheObject; + var map = (Map) form.Controls.Find("Map", true)[0]; // Assert + Assert.AreEqual(MapDataConstants.FeatureBasedMapDataCoordinateSystem, map.Projection); + Assert.AreEqual(ActionMode.Never, map.ProjectionModeDefine); + Assert.AreEqual(9, map.MapFunctions.Count); Assert.AreEqual(1, map.MapFunctions.OfType().Count()); Assert.AreEqual(1, map.MapFunctions.OfType().Count()); Index: Core/Components/test/Core.Components.DotSpatial.Test/Converter/FeatureBasedMapDataConverterTest.cs =================================================================== diff -u -r4dbfc20ef0200e34db43efeb8899d72e4046cc5b -rc6ae22bb8ea36b96be9f859f3348b68c57d4b479 --- Core/Components/test/Core.Components.DotSpatial.Test/Converter/FeatureBasedMapDataConverterTest.cs (.../FeatureBasedMapDataConverterTest.cs) (revision 4dbfc20ef0200e34db43efeb8899d72e4046cc5b) +++ Core/Components/test/Core.Components.DotSpatial.Test/Converter/FeatureBasedMapDataConverterTest.cs (.../FeatureBasedMapDataConverterTest.cs) (revision c6ae22bb8ea36b96be9f859f3348b68c57d4b479) @@ -31,6 +31,7 @@ using Core.Components.Gis.Geometries; using DotSpatial.Controls; using DotSpatial.Data; +using DotSpatial.Projections; using DotSpatial.Symbology; using NUnit.Framework; using Point = DotSpatial.Topology.Point; @@ -167,6 +168,118 @@ } [Test] + public void ConvertLayerFeatures_LayerInSameCoordinateSystemAsMapData_CreatedPointIsNotReprojected() + { + // Setup + var testConverter = new TestFeatureBasedMapDataConverter(); + var mapLayer = new TestFeatureLayer + { + Projection = MapDataConstants.FeatureBasedMapDataCoordinateSystem + }; + var mapData = new TestFeatureBasedMapData("test") + { + Features = new[] + { + new MapFeature(Enumerable.Empty()) // TestFeatureBasedMapDataConverter will generate a Point feature at (1.1, 2.2) + } + }; + + // Call + testConverter.ConvertLayerFeatures(mapData, mapLayer); + + // Assert + Assert.AreEqual(1, mapLayer.FeatureSet.Features.Count); + Assert.AreEqual(1.1, mapLayer.FeatureSet.Features[0].BasicGeometry.Coordinates[0].X); + Assert.AreEqual(2.2, mapLayer.FeatureSet.Features[0].BasicGeometry.Coordinates[0].Y); + Assert.AreEqual(MapDataConstants.FeatureBasedMapDataCoordinateSystem, mapLayer.Projection); + } + + [Test] + public void ConvertLayerFeatures_LayerWithoutCoordinateSystem_CreatePointFeatureInMapDataCoordinateSystem() + { + // Setup + var testConverter = new TestFeatureBasedMapDataConverter(); + var mapLayer = new TestFeatureLayer + { + Projection = null + }; + var mapData = new TestFeatureBasedMapData("test") + { + Features = new[] + { + new MapFeature(Enumerable.Empty()) // TestFeatureBasedMapDataConverter will generate a Point feature at (1.1, 2.2) + } + }; + + // Call + testConverter.ConvertLayerFeatures(mapData, mapLayer); + + // Assert + Assert.AreEqual(1, mapLayer.FeatureSet.Features.Count); + Assert.AreEqual(1.1, mapLayer.FeatureSet.Features[0].BasicGeometry.Coordinates[0].X); + Assert.AreEqual(2.2, mapLayer.FeatureSet.Features[0].BasicGeometry.Coordinates[0].Y); + Assert.AreEqual(MapDataConstants.FeatureBasedMapDataCoordinateSystem, mapLayer.Projection); + } + + [Test] + public void ConvertLayerFeatures_LayerInDifferentSystemAsMapData_CreatedPointIsReprojected() + { + // Setup + var testConverter = new TestFeatureBasedMapDataConverter(); + var coordinateSystem = KnownCoordinateSystems.Geographic.World.WGS1984; + var mapLayer = new TestFeatureLayer + { + Projection = coordinateSystem + }; + var mapData = new TestFeatureBasedMapData("test") + { + Features = new[] + { + new MapFeature(Enumerable.Empty()) // TestFeatureBasedMapDataConverter will generate a Point feature at (1.1, 2.2) + } + }; + + // Call + testConverter.ConvertLayerFeatures(mapData, mapLayer); + + // Assert + Assert.AreEqual(1, mapLayer.FeatureSet.Features.Count); + Assert.AreEqual(3.3135717854013329, mapLayer.FeatureSet.Features[0].BasicGeometry.Coordinates[0].X); + Assert.AreEqual(47.974786294874853, mapLayer.FeatureSet.Features[0].BasicGeometry.Coordinates[0].Y); + Assert.AreEqual(coordinateSystem, mapLayer.Projection); + } + + [Test] + public void ConvertLayerFeatures_LayerWithDataInDifferentCoodinateSystem_CreatedPointIsNotReprojected() + { + // Setup + var testConverter = new TestFeatureBasedMapDataConverter(); + var mapLayer = new TestFeatureLayer + { + Projection = KnownCoordinateSystems.Geographic.World.WGS1984 + }; + var mapData = new TestFeatureBasedMapData("test") + { + Features = new[] + { + new MapFeature(Enumerable.Empty()) // TestFeatureBasedMapDataConverter will generate a Point feature at (1.1, 2.2) + } + }; + + testConverter.ConvertLayerFeatures(mapData, mapLayer); + mapLayer.Projection = MapDataConstants.FeatureBasedMapDataCoordinateSystem; + + // Call + testConverter.ConvertLayerFeatures(mapData, mapLayer); + + // Assert + Assert.AreEqual(1, mapLayer.FeatureSet.Features.Count); + Assert.AreEqual(1.1, mapLayer.FeatureSet.Features[0].BasicGeometry.Coordinates[0].X); + Assert.AreEqual(2.2, mapLayer.FeatureSet.Features[0].BasicGeometry.Coordinates[0].Y); + Assert.AreEqual(MapDataConstants.FeatureBasedMapDataCoordinateSystem, mapLayer.Projection); + } + + [Test] public void ConvertLayerProperties_MapData_NameSetToLayer() { // Setup @@ -395,7 +508,10 @@ private class TestFeatureLayer : MapPointLayer { - public TestFeatureLayer() : base(new FeatureSet()) {} + public TestFeatureLayer() : base(new FeatureSet()) + { + Projection = MapDataConstants.FeatureBasedMapDataCoordinateSystem; + } } private class TestFeatureBasedMapDataConverter : FeatureBasedMapDataConverter Index: Core/Components/test/Core.Components.DotSpatial.Test/Core.Components.DotSpatial.Test.csproj =================================================================== diff -u -r6a5d7b40b7ba4dcb73e393075338352d194e97c2 -rc6ae22bb8ea36b96be9f859f3348b68c57d4b479 --- Core/Components/test/Core.Components.DotSpatial.Test/Core.Components.DotSpatial.Test.csproj (.../Core.Components.DotSpatial.Test.csproj) (revision 6a5d7b40b7ba4dcb73e393075338352d194e97c2) +++ Core/Components/test/Core.Components.DotSpatial.Test/Core.Components.DotSpatial.Test.csproj (.../Core.Components.DotSpatial.Test.csproj) (revision c6ae22bb8ea36b96be9f859f3348b68c57d4b479) @@ -52,6 +52,10 @@ False ..\..\..\..\lib\DotSpatial.1.8\DotSpatial.Extensions.dll + + False + ..\..\..\..\..\Clean_WTI2017\lib\DotSpatial.1.8\DotSpatial.Projections.dll + False ..\..\..\..\lib\DotSpatial.1.8\DotSpatial.Symbology.dll Index: Core/Components/test/Core.Components.DotSpatial.Test/Layer/MapLineDataLayerTest.cs =================================================================== diff -u -r2cafb330e0b90d1103bc9329eafbcba24836787f -rc6ae22bb8ea36b96be9f859f3348b68c57d4b479 --- Core/Components/test/Core.Components.DotSpatial.Test/Layer/MapLineDataLayerTest.cs (.../MapLineDataLayerTest.cs) (revision 2cafb330e0b90d1103bc9329eafbcba24836787f) +++ Core/Components/test/Core.Components.DotSpatial.Test/Layer/MapLineDataLayerTest.cs (.../MapLineDataLayerTest.cs) (revision c6ae22bb8ea36b96be9f859f3348b68c57d4b479) @@ -29,6 +29,7 @@ using Core.Components.Gis.Features; using Core.Components.Gis.Geometries; using DotSpatial.Controls; +using DotSpatial.Projections; using DotSpatial.Symbology; using NUnit.Framework; using LineStyle = Core.Components.Gis.Style.LineStyle; @@ -64,6 +65,7 @@ Assert.IsInstanceOf(mapLineDataLayer); Assert.IsInstanceOf(mapLineDataLayer); AssertMapLineDataLayerTestProperties(mapLineDataLayer); + Assert.AreEqual(KnownCoordinateSystems.Projected.NationalGrids.Rijksdriehoekstelsel, mapLineDataLayer.Projection); } [Test] Index: Core/Components/test/Core.Components.DotSpatial.Test/Layer/MapPointDataLayerTest.cs =================================================================== diff -u -r2cafb330e0b90d1103bc9329eafbcba24836787f -rc6ae22bb8ea36b96be9f859f3348b68c57d4b479 --- Core/Components/test/Core.Components.DotSpatial.Test/Layer/MapPointDataLayerTest.cs (.../MapPointDataLayerTest.cs) (revision 2cafb330e0b90d1103bc9329eafbcba24836787f) +++ Core/Components/test/Core.Components.DotSpatial.Test/Layer/MapPointDataLayerTest.cs (.../MapPointDataLayerTest.cs) (revision c6ae22bb8ea36b96be9f859f3348b68c57d4b479) @@ -29,6 +29,7 @@ using Core.Components.Gis.Geometries; using Core.Components.Gis.Style; using DotSpatial.Controls; +using DotSpatial.Projections; using DotSpatial.Symbology; using NUnit.Framework; @@ -63,6 +64,7 @@ Assert.IsInstanceOf(mapPointDataLayer); Assert.IsInstanceOf(mapPointDataLayer); AssertMapPointDataLayerTestProperties(mapPointDataLayer); + Assert.AreEqual(KnownCoordinateSystems.Projected.NationalGrids.Rijksdriehoekstelsel, mapPointDataLayer.Projection); } [Test] Index: Core/Components/test/Core.Components.DotSpatial.Test/Layer/MapPolygonDataLayerTest.cs =================================================================== diff -u -r2cafb330e0b90d1103bc9329eafbcba24836787f -rc6ae22bb8ea36b96be9f859f3348b68c57d4b479 --- Core/Components/test/Core.Components.DotSpatial.Test/Layer/MapPolygonDataLayerTest.cs (.../MapPolygonDataLayerTest.cs) (revision 2cafb330e0b90d1103bc9329eafbcba24836787f) +++ Core/Components/test/Core.Components.DotSpatial.Test/Layer/MapPolygonDataLayerTest.cs (.../MapPolygonDataLayerTest.cs) (revision c6ae22bb8ea36b96be9f859f3348b68c57d4b479) @@ -29,6 +29,7 @@ using Core.Components.Gis.Geometries; using Core.Components.Gis.Style; using DotSpatial.Controls; +using DotSpatial.Projections; using DotSpatial.Symbology; using NUnit.Framework; @@ -63,6 +64,7 @@ Assert.IsInstanceOf(mapPolygonDataLayer); Assert.IsInstanceOf(mapPolygonDataLayer); AssertMapPolygonDataLayerTestProperties(mapPolygonDataLayer); + Assert.AreEqual(KnownCoordinateSystems.Projected.NationalGrids.Rijksdriehoekstelsel, mapPolygonDataLayer.Projection); } [Test]