Index: Core/Components/src/Core.Components.DotSpatial.Forms/Core.Components.DotSpatial.Forms.csproj =================================================================== diff -u -r168bc897d7ae116bb6e21d9c48669f9f4e708798 -rab2920cda5653e00b56c485ebdd2609404f114ae --- Core/Components/src/Core.Components.DotSpatial.Forms/Core.Components.DotSpatial.Forms.csproj (.../Core.Components.DotSpatial.Forms.csproj) (revision 168bc897d7ae116bb6e21d9c48669f9f4e708798) +++ Core/Components/src/Core.Components.DotSpatial.Forms/Core.Components.DotSpatial.Forms.csproj (.../Core.Components.DotSpatial.Forms.csproj) (revision ab2920cda5653e00b56c485ebdd2609404f114ae) @@ -39,20 +39,17 @@ - - - - - - + + + + + - - - - - - - + + + + + 2.0.8 Index: Core/Components/src/Core.Components.DotSpatial.Forms/MapControl.cs =================================================================== diff -u -r168bc897d7ae116bb6e21d9c48669f9f4e708798 -rab2920cda5653e00b56c485ebdd2609404f114ae --- Core/Components/src/Core.Components.DotSpatial.Forms/MapControl.cs (.../MapControl.cs) (revision 168bc897d7ae116bb6e21d9c48669f9f4e708798) +++ Core/Components/src/Core.Components.DotSpatial.Forms/MapControl.cs (.../MapControl.cs) (revision ab2920cda5653e00b56c485ebdd2609404f114ae) @@ -34,7 +34,7 @@ using DotSpatial.Controls; using DotSpatial.Data; using DotSpatial.Projections; -using GeoAPI.Geometries; +using DotSpatial.Topology; using log4net; using ILog = log4net.ILog; using Timer = System.Timers.Timer; @@ -542,7 +542,7 @@ public void ZoomToAllVisibleLayers(MapData layerData) { - Envelope envelope = CreateEnvelopeForAllVisibleLayers(layerData); + IEnvelope envelope = CreateEnvelopeForAllVisibleLayers(layerData); if (!envelope.IsNull) { Extent extent = envelope.ToExtent(); @@ -558,7 +558,7 @@ /// The area definition. /// Thrown when is /// not part of the drawn map features. - private Envelope CreateEnvelopeForAllVisibleLayers(MapData mapData) + private IEnvelope CreateEnvelopeForAllVisibleLayers(MapData mapData) { var collection = mapData as MapDataCollection; if (collection != null) @@ -573,7 +573,7 @@ nameof(mapData)); } - Envelope envelope = new Envelope(); + IEnvelope envelope = new Envelope(); if (LayerHasVisibleExtent(drawnMapData.FeatureBasedMapDataLayer)) { envelope.ExpandToInclude(drawnMapData.FeatureBasedMapDataLayer.Extent.ToEnvelope()); @@ -589,9 +589,9 @@ /// The area definition. /// Thrown when or /// any of its children is not part of the drawn map features. - private Envelope CreateEnvelopeForAllVisibleLayers(MapDataCollection mapData) + private IEnvelope CreateEnvelopeForAllVisibleLayers(MapDataCollection mapData) { - Envelope envelope = new Envelope(); + IEnvelope envelope = new Envelope(); foreach (MapData childMapData in mapData.Collection) { envelope.ExpandToInclude(CreateEnvelopeForAllVisibleLayers(childMapData)); Index: Core/Components/src/Core.Components.DotSpatial/Converter/FeatureBasedMapDataConverter.cs =================================================================== diff -u -r168bc897d7ae116bb6e21d9c48669f9f4e708798 -rab2920cda5653e00b56c485ebdd2609404f114ae --- Core/Components/src/Core.Components.DotSpatial/Converter/FeatureBasedMapDataConverter.cs (.../FeatureBasedMapDataConverter.cs) (revision 168bc897d7ae116bb6e21d9c48669f9f4e708798) +++ Core/Components/src/Core.Components.DotSpatial/Converter/FeatureBasedMapDataConverter.cs (.../FeatureBasedMapDataConverter.cs) (revision ab2920cda5653e00b56c485ebdd2609404f114ae) @@ -32,7 +32,7 @@ using DotSpatial.Data; using DotSpatial.Projections; using DotSpatial.Symbology; -using GeoAPI.Geometries; +using DotSpatial.Topology; namespace Core.Components.DotSpatial.Converter { Index: Core/Components/src/Core.Components.DotSpatial/Converter/MapLineDataConverter.cs =================================================================== diff -u -r168bc897d7ae116bb6e21d9c48669f9f4e708798 -rab2920cda5653e00b56c485ebdd2609404f114ae --- Core/Components/src/Core.Components.DotSpatial/Converter/MapLineDataConverter.cs (.../MapLineDataConverter.cs) (revision 168bc897d7ae116bb6e21d9c48669f9f4e708798) +++ Core/Components/src/Core.Components.DotSpatial/Converter/MapLineDataConverter.cs (.../MapLineDataConverter.cs) (revision ab2920cda5653e00b56c485ebdd2609404f114ae) @@ -29,8 +29,7 @@ using DotSpatial.Controls; using DotSpatial.Data; using DotSpatial.Symbology; -using GeoAPI.Geometries; -using NetTopologySuite.Geometries; +using DotSpatial.Topology; using LineStyle = Core.Components.Gis.Style.LineStyle; namespace Core.Components.DotSpatial.Converter @@ -78,7 +77,7 @@ LineCap.Round); } - private static IGeometry GetGeometry(MapFeature mapFeature) + private static IBasicGeometry GetGeometry(MapFeature mapFeature) { var factory = new GeometryFactory(); @@ -98,10 +97,9 @@ return GetLineString(factory, pointsToConvert); } - private static ILineString GetLineString(IGeometryFactory factory, IEnumerable points) + private static IBasicLineString GetLineString(IGeometryFactory factory, IEnumerable points) { - Coordinate[] coordinates = points.Select(point => new Coordinate(point.X, point.Y)).ToArray(); - return factory.CreateLineString(coordinates); + return factory.CreateLineString(ConvertPoint2DElementsToCoordinates(points).ToArray()); } } } \ No newline at end of file Index: Core/Components/src/Core.Components.DotSpatial/Converter/MapPointDataConverter.cs =================================================================== diff -u -r168bc897d7ae116bb6e21d9c48669f9f4e708798 -rab2920cda5653e00b56c485ebdd2609404f114ae --- Core/Components/src/Core.Components.DotSpatial/Converter/MapPointDataConverter.cs (.../MapPointDataConverter.cs) (revision 168bc897d7ae116bb6e21d9c48669f9f4e708798) +++ Core/Components/src/Core.Components.DotSpatial/Converter/MapPointDataConverter.cs (.../MapPointDataConverter.cs) (revision ab2920cda5653e00b56c485ebdd2609404f114ae) @@ -28,7 +28,7 @@ using DotSpatial.Controls; using DotSpatial.Data; using DotSpatial.Symbology; -using GeoAPI.Geometries; +using DotSpatial.Topology; namespace Core.Components.DotSpatial.Converter { @@ -39,7 +39,7 @@ { protected override IEnumerable CreateFeatures(MapFeature mapFeature) { - return GetAllMapFeatureCoordinates(mapFeature).Select(c => new Feature(new Coordinate(c.X, c.Y))).ToArray(); + return GetAllMapFeatureCoordinates(mapFeature).Select(c => new Feature(new Point(c.X, c.Y))).ToArray(); } protected override IFeatureSymbolizer CreateSymbolizer(MapPointData mapData) Index: Core/Components/src/Core.Components.DotSpatial/Converter/MapPolygonDataConverter.cs =================================================================== diff -u -r168bc897d7ae116bb6e21d9c48669f9f4e708798 -rab2920cda5653e00b56c485ebdd2609404f114ae --- Core/Components/src/Core.Components.DotSpatial/Converter/MapPolygonDataConverter.cs (.../MapPolygonDataConverter.cs) (revision 168bc897d7ae116bb6e21d9c48669f9f4e708798) +++ Core/Components/src/Core.Components.DotSpatial/Converter/MapPolygonDataConverter.cs (.../MapPolygonDataConverter.cs) (revision ab2920cda5653e00b56c485ebdd2609404f114ae) @@ -31,8 +31,7 @@ using DotSpatial.Controls; using DotSpatial.Data; using DotSpatial.Symbology; -using GeoAPI.Geometries; -using NetTopologySuite.Geometries; +using DotSpatial.Topology; namespace Core.Components.DotSpatial.Converter { @@ -49,13 +48,13 @@ { IEnumerable[] pointCollections = mapGeometry.PointCollections.ToArray(); - Coordinate[] outerRingCoordinates = ConvertPoint2DElementsToCoordinates(pointCollections[0]).ToArray(); + IEnumerable outerRingCoordinates = ConvertPoint2DElementsToCoordinates(pointCollections[0]); ILinearRing outerRing = new LinearRing(outerRingCoordinates); var innerRings = new ILinearRing[pointCollections.Length - 1]; for (var i = 1; i < pointCollections.Length; i++) { - Coordinate[] innerRingCoordinates = ConvertPoint2DElementsToCoordinates(pointCollections[i]).ToArray(); + IEnumerable innerRingCoordinates = ConvertPoint2DElementsToCoordinates(pointCollections[i]); innerRings[i - 1] = new LinearRing(innerRingCoordinates); } @@ -105,9 +104,9 @@ return new PolygonCategory(style.FillColor, GetStrokeColor(style), style.StrokeThickness); } - private static IGeometry GetGeometry(List geometryList) + private static IBasicGeometry GetGeometry(List geometryList) { - IGeometry geometry; + IBasicGeometry geometry; var factory = new GeometryFactory(); if (geometryList.Count > 1) Index: Core/Components/src/Core.Components.DotSpatial/Core.Components.DotSpatial.csproj =================================================================== diff -u -r168bc897d7ae116bb6e21d9c48669f9f4e708798 -rab2920cda5653e00b56c485ebdd2609404f114ae --- Core/Components/src/Core.Components.DotSpatial/Core.Components.DotSpatial.csproj (.../Core.Components.DotSpatial.csproj) (revision 168bc897d7ae116bb6e21d9c48669f9f4e708798) +++ Core/Components/src/Core.Components.DotSpatial/Core.Components.DotSpatial.csproj (.../Core.Components.DotSpatial.csproj) (revision ab2920cda5653e00b56c485ebdd2609404f114ae) @@ -50,20 +50,17 @@ 2.1.2 - - - - - - + + + + + - - - - - - - + + + + + \ No newline at end of file Index: Core/Components/src/Core.Components.DotSpatial/Layer/BruTile/BruTileLayer.cs =================================================================== diff -u -r168bc897d7ae116bb6e21d9c48669f9f4e708798 -rab2920cda5653e00b56c485ebdd2609404f114ae --- Core/Components/src/Core.Components.DotSpatial/Layer/BruTile/BruTileLayer.cs (.../BruTileLayer.cs) (revision 168bc897d7ae116bb6e21d9c48669f9f4e708798) +++ Core/Components/src/Core.Components.DotSpatial/Layer/BruTile/BruTileLayer.cs (.../BruTileLayer.cs) (revision ab2920cda5653e00b56c485ebdd2609404f114ae) @@ -63,15 +63,14 @@ using Core.Components.DotSpatial.Properties; using Core.Components.Gis.Exceptions; using DotSpatial.Controls; -using DotSpatial.Data; using DotSpatial.Projections; using DotSpatial.Projections.AuthorityCodes; -using GeoAPI.Geometries; +using DotSpatial.Symbology; +using DotSpatial.Topology; using BruTileExtent = BruTile.Extent; using DotSpatialExtent = DotSpatial.Data.Extent; using DotSpatialLayer = DotSpatial.Symbology.Layer; using Point = System.Drawing.Point; -using WorldFile = Core.Components.DotSpatial.Projections.WorldFile; namespace Core.Components.DotSpatial.Layer.BruTile { @@ -357,19 +356,19 @@ private static bool TryParseProjectionProj4(string proj4, out ProjectionInfo projectionInfo) { - return TryParseString(() => ProjectionInfo.FromProj4String(proj4), out projectionInfo); + return TryParseString(proj4, ProjectionInfo.FromProj4String, out projectionInfo); } private static bool TryParseProjectionEsri(string esriWkt, out ProjectionInfo projectionInfo) { - return TryParseString(() => ProjectionInfo.FromEsriString(esriWkt), out projectionInfo); + return TryParseString(esriWkt, ProjectionInfo.FromEsriString, out projectionInfo); } - private static bool TryParseString(Func parseText, out ProjectionInfo projectionInfo) + private static bool TryParseString(string text, Func parseText, out ProjectionInfo projectionInfo) { try { - projectionInfo = parseText(); + projectionInfo = parseText(text); } catch { Index: Core/Components/src/Core.Components.DotSpatial/MapFunctions/MapFunctionSelectionZoom.cs =================================================================== diff -u -r168bc897d7ae116bb6e21d9c48669f9f4e708798 -rab2920cda5653e00b56c485ebdd2609404f114ae --- Core/Components/src/Core.Components.DotSpatial/MapFunctions/MapFunctionSelectionZoom.cs (.../MapFunctionSelectionZoom.cs) (revision 168bc897d7ae116bb6e21d9c48669f9f4e708798) +++ Core/Components/src/Core.Components.DotSpatial/MapFunctions/MapFunctionSelectionZoom.cs (.../MapFunctionSelectionZoom.cs) (revision ab2920cda5653e00b56c485ebdd2609404f114ae) @@ -26,7 +26,7 @@ using DotSpatial.Controls; using DotSpatial.Data; using DotSpatial.Symbology; -using GeoAPI.Geometries; +using DotSpatial.Topology; using Point = System.Drawing.Point; namespace Core.Components.DotSpatial.MapFunctions @@ -138,7 +138,7 @@ } else if (geoStartPoint != null) { - Envelope env = new Envelope(geoStartPoint.X, e.GeographicLocation.X, + IEnvelope env = new Envelope(geoStartPoint.X, e.GeographicLocation.X, geoStartPoint.Y, e.GeographicLocation.Y); if (Math.Abs(e.X - startPoint.X) > 1 && Math.Abs(e.Y - startPoint.Y) > 1) { Index: Core/Components/src/Core.Components.DotSpatial/Projections/ReprojectExtensions.cs =================================================================== diff -u -r168bc897d7ae116bb6e21d9c48669f9f4e708798 -rab2920cda5653e00b56c485ebdd2609404f114ae --- Core/Components/src/Core.Components.DotSpatial/Projections/ReprojectExtensions.cs (.../ReprojectExtensions.cs) (revision 168bc897d7ae116bb6e21d9c48669f9f4e708798) +++ Core/Components/src/Core.Components.DotSpatial/Projections/ReprojectExtensions.cs (.../ReprojectExtensions.cs) (revision ab2920cda5653e00b56c485ebdd2609404f114ae) @@ -21,10 +21,9 @@ using System; using System.Collections.Generic; -using System.Linq; using DotSpatial.Data; using DotSpatial.Projections; -using GeoAPI.Geometries; +using DotSpatial.Topology; using DotSpatialReproject = DotSpatial.Projections.Reproject; namespace Core.Components.DotSpatial.Projections @@ -68,13 +67,13 @@ throw new ArgumentNullException(nameof(target)); } - if (ring.Coordinates.Length < 3) + if (ring.Coordinates.Count < 3) { throw new ArgumentException(@"Ring must contain at least 3 coordinates.", nameof(ring)); } - Coordinate[] seq = Reproject(ring.Coordinates.Densify(36).ToArray(), source, target); + IList seq = Reproject(ring.Coordinates.Densify(36), source, target); return ring.Factory.CreateLinearRing(seq); } @@ -113,17 +112,17 @@ return ToExtent(xy); } - private static Coordinate[] Reproject(this Coordinate[] coordinates, ProjectionInfo source, ProjectionInfo target) + private static IList Reproject(this IList coordinates, ProjectionInfo source, ProjectionInfo target) { if (target.Transform == null) { return coordinates; } - var xy = new double[coordinates.Length * 2]; - var z = new double[coordinates.Length]; + var xy = new double[coordinates.Count * 2]; + var z = new double[coordinates.Count]; var j = 0; - for (var i = 0; i < coordinates.Length; i++) + for (var i = 0; i < coordinates.Count; i++) { Coordinate c = coordinates[i]; xy[j] = c.X; @@ -132,16 +131,16 @@ z[i] = double.IsNaN(c.Z) ? 0 : c.Z; } - DotSpatialReproject.ReprojectPoints(xy, z, source, target, 0, coordinates.Length); + DotSpatialReproject.ReprojectPoints(xy, z, source, target, 0, coordinates.Count); - var result = new List(coordinates.Length); + var result = new List(coordinates.Count); j = 0; - for (var i = 0; i < coordinates.Length; i++) + for (var i = 0; i < coordinates.Count; i++) { result.Add(new Coordinate(xy[j++], xy[j++])); } - return result.ToArray(); + return result; } /// Index: Core/Components/src/Core.Components.DotSpatial/Projections/TileReprojector.cs =================================================================== diff -u -r168bc897d7ae116bb6e21d9c48669f9f4e708798 -rab2920cda5653e00b56c485ebdd2609404f114ae --- Core/Components/src/Core.Components.DotSpatial/Projections/TileReprojector.cs (.../TileReprojector.cs) (revision 168bc897d7ae116bb6e21d9c48669f9f4e708798) +++ Core/Components/src/Core.Components.DotSpatial/Projections/TileReprojector.cs (.../TileReprojector.cs) (revision ab2920cda5653e00b56c485ebdd2609404f114ae) @@ -27,7 +27,8 @@ using DotSpatial.Controls; using DotSpatial.Data; using DotSpatial.Projections; -using GeoAPI.Geometries; +using DotSpatial.Symbology; +using DotSpatial.Topology; using DotSpatialReproject = DotSpatial.Projections.Reproject; using Point = System.Drawing.Point; Index: Core/Components/src/Core.Components.DotSpatial/Projections/WorldFile.cs =================================================================== diff -u -r168bc897d7ae116bb6e21d9c48669f9f4e708798 -rab2920cda5653e00b56c485ebdd2609404f114ae --- Core/Components/src/Core.Components.DotSpatial/Projections/WorldFile.cs (.../WorldFile.cs) (revision 168bc897d7ae116bb6e21d9c48669f9f4e708798) +++ Core/Components/src/Core.Components.DotSpatial/Projections/WorldFile.cs (.../WorldFile.cs) (revision ab2920cda5653e00b56c485ebdd2609404f114ae) @@ -21,10 +21,8 @@ using System; using System.Collections.Generic; -using System.Linq; using Core.Components.DotSpatial.Properties; -using GeoAPI.Geometries; -using NetTopologySuite.Geometries; +using DotSpatial.Topology; using Point = System.Drawing.Point; namespace Core.Components.DotSpatial.Projections @@ -183,16 +181,16 @@ /// The ground bounding-ordinate. public IPolygon BoundingOrdinatesToWorldCoordinates(int width, int height) { - var ringCoordinates = new Coordinate[5]; + var ringCoordinates = new List(5); Coordinate leftTop = ToWorldCoordinates(0, 0); - ringCoordinates.Concat(new[] + ringCoordinates.AddRange(new[] { leftTop, ToWorldCoordinates(0, height), ToWorldCoordinates(width, 0), ToWorldCoordinates(width, height), leftTop - }).ToArray(); + }); ILinearRing ring = GeometryFactory.Default.CreateLinearRing(ringCoordinates); return GeometryFactory.Default.CreatePolygon(ring, null); Index: Core/Components/src/Core.Components.Gis.IO/Core.Components.Gis.IO.csproj =================================================================== diff -u -r168bc897d7ae116bb6e21d9c48669f9f4e708798 -rab2920cda5653e00b56c485ebdd2609404f114ae --- Core/Components/src/Core.Components.Gis.IO/Core.Components.Gis.IO.csproj (.../Core.Components.Gis.IO.csproj) (revision 168bc897d7ae116bb6e21d9c48669f9f4e708798) +++ Core/Components/src/Core.Components.Gis.IO/Core.Components.Gis.IO.csproj (.../Core.Components.Gis.IO.csproj) (revision ab2920cda5653e00b56c485ebdd2609404f114ae) @@ -41,20 +41,17 @@ - - - - - - + + + + + - - - - - - - + + + + + 2.0.8 Index: Core/Components/src/Core.Components.Gis.IO/Importers/FeatureBasedMapDataImporter.cs =================================================================== diff -u -r168bc897d7ae116bb6e21d9c48669f9f4e708798 -rab2920cda5653e00b56c485ebdd2609404f114ae --- Core/Components/src/Core.Components.Gis.IO/Importers/FeatureBasedMapDataImporter.cs (.../FeatureBasedMapDataImporter.cs) (revision 168bc897d7ae116bb6e21d9c48669f9f4e708798) +++ Core/Components/src/Core.Components.Gis.IO/Importers/FeatureBasedMapDataImporter.cs (.../FeatureBasedMapDataImporter.cs) (revision ab2920cda5653e00b56c485ebdd2609404f114ae) @@ -30,6 +30,7 @@ using Core.Components.Gis.IO.Properties; using Core.Components.Gis.IO.Readers; using DotSpatial.Data; +using DotSpatial.Topology; namespace Core.Components.Gis.IO.Importers { Index: Core/Components/src/Core.Components.Gis.IO/Readers/PointShapeFileReader.cs =================================================================== diff -u -r168bc897d7ae116bb6e21d9c48669f9f4e708798 -rab2920cda5653e00b56c485ebdd2609404f114ae --- Core/Components/src/Core.Components.Gis.IO/Readers/PointShapeFileReader.cs (.../PointShapeFileReader.cs) (revision 168bc897d7ae116bb6e21d9c48669f9f4e708798) +++ Core/Components/src/Core.Components.Gis.IO/Readers/PointShapeFileReader.cs (.../PointShapeFileReader.cs) (revision ab2920cda5653e00b56c485ebdd2609404f114ae) @@ -30,7 +30,7 @@ using Core.Components.Gis.Features; using Core.Components.Gis.Geometries; using DotSpatial.Data; -using GeoAPI.Geometries; +using DotSpatial.Topology; using CoreCommonUtilResources = Core.Common.Util.Properties.Resources; using GisIOResources = Core.Components.Gis.IO.Properties.Resources; @@ -169,7 +169,7 @@ private static MapFeature CreateMapFeatureForPointFeature(IFeature pointFeature) { - IEnumerable mapGeometries = pointFeature.Geometry.Coordinates.Select(c => new MapGeometry(GetMapGeometryPointCollections(c))).ToArray(); + IEnumerable mapGeometries = pointFeature.Coordinates.Select(c => new MapGeometry(GetMapGeometryPointCollections(c))).ToArray(); return new MapFeature(mapGeometries); } Index: Core/Components/src/Core.Components.Gis.IO/Readers/PolygonShapeFileReader.cs =================================================================== diff -u -r168bc897d7ae116bb6e21d9c48669f9f4e708798 -rab2920cda5653e00b56c485ebdd2609404f114ae --- Core/Components/src/Core.Components.Gis.IO/Readers/PolygonShapeFileReader.cs (.../PolygonShapeFileReader.cs) (revision 168bc897d7ae116bb6e21d9c48669f9f4e708798) +++ Core/Components/src/Core.Components.Gis.IO/Readers/PolygonShapeFileReader.cs (.../PolygonShapeFileReader.cs) (revision ab2920cda5653e00b56c485ebdd2609404f114ae) @@ -30,7 +30,7 @@ using Core.Components.Gis.Features; using Core.Components.Gis.Geometries; using DotSpatial.Data; -using GeoAPI.Geometries; +using DotSpatial.Topology; using CoreCommonUtilResources = Core.Common.Util.Properties.Resources; using GisIOResources = Core.Components.Gis.IO.Properties.Resources; @@ -166,9 +166,9 @@ { var geometries = new List(); - for (var i = 0; i < polygonFeature.Geometry.NumGeometries; i++) + for (var i = 0; i < polygonFeature.BasicGeometry.NumGeometries; i++) { - var basicPolygon = (IPolygon) polygonFeature.Geometry.GetGeometryN(i); + var basicPolygon = (IBasicPolygon) polygonFeature.BasicGeometry.GetBasicGeometryN(i); var mapGeometry = new MapGeometry(GetMapGeometryPointCollections(basicPolygon).ToArray()); geometries.Add(mapGeometry); @@ -177,10 +177,10 @@ return new MapFeature(geometries); } - private static IEnumerable> GetMapGeometryPointCollections(IPolygon polygon) + private static IEnumerable> GetMapGeometryPointCollections(IBasicPolygon polygon) { yield return polygon.Shell.Coordinates.Select(c => new Point2D(c.X, c.Y)); - foreach (ILinearRing hole in polygon.Holes) + foreach (IBasicLineString hole in polygon.Holes) { yield return hole.Coordinates.Select(c => new Point2D(c.X, c.Y)); } Index: Core/Components/src/Core.Components.Gis.IO/Readers/PolylineShapeFileReader.cs =================================================================== diff -u -r168bc897d7ae116bb6e21d9c48669f9f4e708798 -rab2920cda5653e00b56c485ebdd2609404f114ae --- Core/Components/src/Core.Components.Gis.IO/Readers/PolylineShapeFileReader.cs (.../PolylineShapeFileReader.cs) (revision 168bc897d7ae116bb6e21d9c48669f9f4e708798) +++ Core/Components/src/Core.Components.Gis.IO/Readers/PolylineShapeFileReader.cs (.../PolylineShapeFileReader.cs) (revision ab2920cda5653e00b56c485ebdd2609404f114ae) @@ -31,10 +31,8 @@ using Core.Components.Gis.Geometries; using DotSpatial.Data; using DotSpatial.Topology; -using Coordinate = GeoAPI.Geometries.Coordinate; using CoreCommonUtilResources = Core.Common.Util.Properties.Resources; using GisIOResources = Core.Components.Gis.IO.Properties.Resources; -using IGeometry = GeoAPI.Geometries.IGeometry; namespace Core.Components.Gis.IO.Readers { @@ -177,9 +175,9 @@ { var geometries = new List(); - for (var i = 0; i < lineFeature.Geometry.NumGeometries; i++) + for (var i = 0; i < lineFeature.BasicGeometry.NumGeometries; i++) { - IGeometry polylineGeometry = lineFeature.Geometry.GetGeometryN(i); + IBasicGeometry polylineGeometry = lineFeature.BasicGeometry.GetBasicGeometryN(i); var mapGeometry = new MapGeometry(GetMapGeometryPointCollections(polylineGeometry.Coordinates)); geometries.Add(mapGeometry); Index: Core/Components/src/Core.Components.Gis.IO/Writers/PointShapeFileWriter.cs =================================================================== diff -u -r168bc897d7ae116bb6e21d9c48669f9f4e708798 -rab2920cda5653e00b56c485ebdd2609404f114ae --- Core/Components/src/Core.Components.Gis.IO/Writers/PointShapeFileWriter.cs (.../PointShapeFileWriter.cs) (revision 168bc897d7ae116bb6e21d9c48669f9f4e708798) +++ Core/Components/src/Core.Components.Gis.IO/Writers/PointShapeFileWriter.cs (.../PointShapeFileWriter.cs) (revision ab2920cda5653e00b56c485ebdd2609404f114ae) @@ -27,9 +27,7 @@ using Core.Components.Gis.Geometries; using Core.Components.Gis.IO.Properties; using DotSpatial.Data; -using GeoAPI.Geometries; -using NetTopologySuite.Geometries; -using FeatureType = DotSpatial.Data.FeatureType; +using DotSpatial.Topology; namespace Core.Components.Gis.IO.Writers { Index: Core/Components/src/Core.Components.Gis.IO/Writers/PolylineShapeFileWriter.cs =================================================================== diff -u -r168bc897d7ae116bb6e21d9c48669f9f4e708798 -rab2920cda5653e00b56c485ebdd2609404f114ae --- Core/Components/src/Core.Components.Gis.IO/Writers/PolylineShapeFileWriter.cs (.../PolylineShapeFileWriter.cs) (revision 168bc897d7ae116bb6e21d9c48669f9f4e708798) +++ Core/Components/src/Core.Components.Gis.IO/Writers/PolylineShapeFileWriter.cs (.../PolylineShapeFileWriter.cs) (revision ab2920cda5653e00b56c485ebdd2609404f114ae) @@ -27,9 +27,7 @@ using Core.Components.Gis.Geometries; using Core.Components.Gis.IO.Properties; using DotSpatial.Data; -using GeoAPI.Geometries; -using NetTopologySuite.Geometries; -using FeatureType = DotSpatial.Data.FeatureType; +using DotSpatial.Topology; namespace Core.Components.Gis.IO.Writers { @@ -67,7 +65,7 @@ IEnumerable mapGeometryPointCollection = geometry.PointCollections.First(); - Coordinate[] coordinates = mapGeometryPointCollection.Select(p => new Coordinate(p.X, p.Y)).ToArray(); + List coordinates = mapGeometryPointCollection.Select(p => new Coordinate(p.X, p.Y)).ToList(); return new LineString(coordinates); } Index: Core/Components/test/Core.Components.DotSpatial.Forms.Test/Core.Components.DotSpatial.Forms.Test.csproj =================================================================== diff -u -r168bc897d7ae116bb6e21d9c48669f9f4e708798 -rab2920cda5653e00b56c485ebdd2609404f114ae --- Core/Components/test/Core.Components.DotSpatial.Forms.Test/Core.Components.DotSpatial.Forms.Test.csproj (.../Core.Components.DotSpatial.Forms.Test.csproj) (revision 168bc897d7ae116bb6e21d9c48669f9f4e708798) +++ Core/Components/test/Core.Components.DotSpatial.Forms.Test/Core.Components.DotSpatial.Forms.Test.csproj (.../Core.Components.DotSpatial.Forms.Test.csproj) (revision ab2920cda5653e00b56c485ebdd2609404f114ae) @@ -31,20 +31,17 @@ 2.1.2 - - - - - - + + + + + - - - - - - - + + + + + 3.8.1 Index: Core/Components/test/Core.Components.DotSpatial.Forms.Test/MapControlTest.cs =================================================================== diff -u -r168bc897d7ae116bb6e21d9c48669f9f4e708798 -rab2920cda5653e00b56c485ebdd2609404f114ae --- Core/Components/test/Core.Components.DotSpatial.Forms.Test/MapControlTest.cs (.../MapControlTest.cs) (revision 168bc897d7ae116bb6e21d9c48669f9f4e708798) +++ Core/Components/test/Core.Components.DotSpatial.Forms.Test/MapControlTest.cs (.../MapControlTest.cs) (revision ab2920cda5653e00b56c485ebdd2609404f114ae) @@ -50,7 +50,7 @@ using NUnit.Framework; using Rhino.Mocks; using Extent = DotSpatial.Data.Extent; -using IMapView = DotSpatial.Controls.IMap; +using IMapView = DotSpatial.Controls.IMapView; namespace Core.Components.DotSpatial.Forms.Test { @@ -164,8 +164,8 @@ List featureLayers = mapView.Layers.Cast().ToList(); Assert.AreEqual("Points", featureLayers[0].Name); Assert.IsTrue(mapView.Projection.Equals(featureLayers[0].Projection)); - Assert.AreEqual(1.1, featureLayers[0].FeatureSet.Features[0].Geometry.Coordinates[0].X); - Assert.AreEqual(2.2, featureLayers[0].FeatureSet.Features[0].Geometry.Coordinates[0].Y); + Assert.AreEqual(1.1, featureLayers[0].FeatureSet.Features[0].BasicGeometry.Coordinates[0].X); + Assert.AreEqual(2.2, featureLayers[0].FeatureSet.Features[0].BasicGeometry.Coordinates[0].Y); Assert.AreEqual("Lines", featureLayers[1].Name); Assert.IsTrue(mapView.Projection.Equals(featureLayers[1].Projection)); Assert.AreEqual("Polygons", featureLayers[2].Name); @@ -1019,8 +1019,8 @@ IMapLayer[] layersBeforeUpdate = mapView.Layers.ToArray(); var pointFeatureLayer = (FeatureLayer) layersBeforeUpdate[0]; Assert.IsTrue(mapView.Projection.Equals(pointFeatureLayer.Projection)); - Assert.AreEqual(1.1, pointFeatureLayer.FeatureSet.Features[0].Geometry.Coordinates[0].X); - Assert.AreEqual(2.2, pointFeatureLayer.FeatureSet.Features[0].Geometry.Coordinates[0].Y); + Assert.AreEqual(1.1, pointFeatureLayer.FeatureSet.Features[0].BasicGeometry.Coordinates[0].X); + Assert.AreEqual(2.2, pointFeatureLayer.FeatureSet.Features[0].BasicGeometry.Coordinates[0].Y); AssertOriginalExtents(mapView); // When @@ -1035,9 +1035,9 @@ Assert.IsInstanceOf(mapView.Layers[0]); Assert.IsTrue(mapView.Projection.Equals(pointFeatureLayer.Projection)); Assert.IsTrue(mapView.Projection.Equals(pointFeatureLayer.Projection)); - Assert.AreEqual(523414.9114786592, pointFeatureLayer.FeatureSet.Features[0].Geometry.Coordinates[0].X, + Assert.AreEqual(523414.9114786592, pointFeatureLayer.FeatureSet.Features[0].BasicGeometry.Coordinates[0].X, "Coordinate does not match. (Ball park expected value can be calculated from https://epsg.io/transform#s_srs=28992&t_srs=25831&x=1.1000000&y=2.2000000)."); - Assert.AreEqual(5313600.4932731427, pointFeatureLayer.FeatureSet.Features[0].Geometry.Coordinates[0].Y, + Assert.AreEqual(5313600.4932731427, pointFeatureLayer.FeatureSet.Features[0].BasicGeometry.Coordinates[0].Y, "Coordinate does not match (Estimate of expected value can be calculated from https://epsg.io/transform#s_srs=28992&t_srs=25831&x=1.1000000&y=2.2000000)."); AssertReprojectedTo28992TestExtents(mapView); } @@ -1087,9 +1087,9 @@ var pointFeatureLayer = (FeatureLayer) layersBeforeUpdate[1]; Assert.IsTrue(mapView.Projection.Equals(pointFeatureLayer.Projection)); Assert.IsTrue(mapView.Projection.Equals(pointFeatureLayer.Projection)); - Assert.AreEqual(523414.9114786592, pointFeatureLayer.FeatureSet.Features[0].Geometry.Coordinates[0].X, + Assert.AreEqual(523414.9114786592, pointFeatureLayer.FeatureSet.Features[0].BasicGeometry.Coordinates[0].X, "Coordinate does not match. (Ball park expected value can be calculated from https://epsg.io/transform#s_srs=28992&t_srs=25831&x=1.1000000&y=2.2000000)."); - Assert.AreEqual(5313600.4932731427, pointFeatureLayer.FeatureSet.Features[0].Geometry.Coordinates[0].Y, + Assert.AreEqual(5313600.4932731427, pointFeatureLayer.FeatureSet.Features[0].BasicGeometry.Coordinates[0].Y, "Coordinate does not match (Estimate of expected value can be calculated from https://epsg.io/transform#s_srs=28992&t_srs=25831&x=1.1000000&y=2.2000000)."); // When @@ -1101,9 +1101,9 @@ Assert.AreEqual(1, mapView.Layers.Count); CollectionAssert.DoesNotContain(mapView.Layers, layersBeforeUpdate[0]); Assert.IsTrue(mapView.Projection.Equals(pointFeatureLayer.Projection)); - Assert.AreEqual(1.1, pointFeatureLayer.FeatureSet.Features[0].Geometry.Coordinates[0].X, 1e-6, + Assert.AreEqual(1.1, pointFeatureLayer.FeatureSet.Features[0].BasicGeometry.Coordinates[0].X, 1e-6, "Minimal drift is acceptable (if it becomes a problem, we need to keep original coordinates in the layer)."); - Assert.AreEqual(2.2, pointFeatureLayer.FeatureSet.Features[0].Geometry.Coordinates[0].Y, 1e-6, + Assert.AreEqual(2.2, pointFeatureLayer.FeatureSet.Features[0].BasicGeometry.Coordinates[0].Y, 1e-6, "Minimal drift is acceptable (if it becomes a problem, we need to keep original coordinates in the layer)."); AssertOriginalExtents(mapView); } @@ -1144,8 +1144,8 @@ // Precondition Assert.AreEqual(1, mapView.Layers.Count); var pointFeatureLayer = (FeatureLayer) mapView.Layers[0]; - Assert.AreEqual(1.1, pointFeatureLayer.FeatureSet.Features[0].Geometry.Coordinates[0].X); - Assert.AreEqual(2.2, pointFeatureLayer.FeatureSet.Features[0].Geometry.Coordinates[0].Y); + Assert.AreEqual(1.1, pointFeatureLayer.FeatureSet.Features[0].BasicGeometry.Coordinates[0].X); + Assert.AreEqual(2.2, pointFeatureLayer.FeatureSet.Features[0].BasicGeometry.Coordinates[0].Y); // When map.BackgroundMapData = backgroundMapData; @@ -1155,9 +1155,9 @@ Assert.IsInstanceOf(mapView.Layers[0]); pointFeatureLayer = (FeatureLayer) mapView.Layers[1]; Assert.IsTrue(mapView.Projection.Equals(pointFeatureLayer.Projection)); - Assert.AreEqual(523414.9114786592, pointFeatureLayer.FeatureSet.Features[0].Geometry.Coordinates[0].X, + Assert.AreEqual(523414.9114786592, pointFeatureLayer.FeatureSet.Features[0].BasicGeometry.Coordinates[0].X, "Coordinate does not match. (Ball park expected value can be calculated from https://epsg.io/transform#s_srs=28992&t_srs=25831&x=1.1000000&y=2.2000000)."); - Assert.AreEqual(5313600.4932731427, pointFeatureLayer.FeatureSet.Features[0].Geometry.Coordinates[0].Y, + Assert.AreEqual(5313600.4932731427, pointFeatureLayer.FeatureSet.Features[0].BasicGeometry.Coordinates[0].Y, "Coordinate does not match (Estimate of expected value can be calculated from https://epsg.io/transform#s_srs=28992&t_srs=25831&x=1.1000000&y=2.2000000)."); AssertReprojectedTo28992TestExtents(mapView); @@ -1199,8 +1199,8 @@ // Precondition Assert.AreEqual(1, mapView.Layers.Count); var pointFeatureLayer = (FeatureLayer) mapView.Layers[0]; - Assert.AreEqual(1.1, pointFeatureLayer.FeatureSet.Features[0].Geometry.Coordinates[0].X); - Assert.AreEqual(2.2, pointFeatureLayer.FeatureSet.Features[0].Geometry.Coordinates[0].Y); + Assert.AreEqual(1.1, pointFeatureLayer.FeatureSet.Features[0].BasicGeometry.Coordinates[0].X); + Assert.AreEqual(2.2, pointFeatureLayer.FeatureSet.Features[0].BasicGeometry.Coordinates[0].Y); // When map.BackgroundMapData = backgroundMapData; @@ -1209,8 +1209,8 @@ Assert.AreEqual(1, mapView.Layers.Count); pointFeatureLayer = (FeatureLayer) mapView.Layers[0]; Assert.IsTrue(mapView.Projection.Equals(pointFeatureLayer.Projection)); - Assert.AreEqual(1.1, pointFeatureLayer.FeatureSet.Features[0].Geometry.Coordinates[0].X); - Assert.AreEqual(2.2, pointFeatureLayer.FeatureSet.Features[0].Geometry.Coordinates[0].Y); + Assert.AreEqual(1.1, pointFeatureLayer.FeatureSet.Features[0].BasicGeometry.Coordinates[0].X); + Assert.AreEqual(2.2, pointFeatureLayer.FeatureSet.Features[0].BasicGeometry.Coordinates[0].Y); AssertOriginalExtents(mapView); } } @@ -1253,8 +1253,8 @@ Assert.IsInstanceOf(mapView.Layers[0]); var pointFeatureLayer = (FeatureLayer) mapView.Layers[1]; Assert.IsTrue(mapView.Projection.Equals(pointFeatureLayer.Projection)); - Assert.AreEqual(1.1, pointFeatureLayer.FeatureSet.Features[0].Geometry.Coordinates[0].X); - Assert.AreEqual(2.2, pointFeatureLayer.FeatureSet.Features[0].Geometry.Coordinates[0].Y); + Assert.AreEqual(1.1, pointFeatureLayer.FeatureSet.Features[0].BasicGeometry.Coordinates[0].X); + Assert.AreEqual(2.2, pointFeatureLayer.FeatureSet.Features[0].BasicGeometry.Coordinates[0].Y); // When WmtsMapData differentBackgroundMapData = WmtsMapDataTestHelper.CreateAlternativePdokMapData(); @@ -1267,9 +1267,9 @@ Assert.IsInstanceOf(mapView.Layers[0]); pointFeatureLayer = (FeatureLayer) mapView.Layers[1]; Assert.IsTrue(mapView.Projection.Equals(pointFeatureLayer.Projection)); - Assert.AreEqual(523414.9114786592, pointFeatureLayer.FeatureSet.Features[0].Geometry.Coordinates[0].X, + Assert.AreEqual(523414.9114786592, pointFeatureLayer.FeatureSet.Features[0].BasicGeometry.Coordinates[0].X, "Coordinate does not match. (Ball park expected value can be calculated from https://epsg.io/transform#s_srs=28992&t_srs=25831&x=1.1000000&y=2.2000000)."); - Assert.AreEqual(5313600.4932731427, pointFeatureLayer.FeatureSet.Features[0].Geometry.Coordinates[0].Y, + Assert.AreEqual(5313600.4932731427, pointFeatureLayer.FeatureSet.Features[0].BasicGeometry.Coordinates[0].Y, "Coordinate does not match (Estimate of expected value can be calculated from https://epsg.io/transform#s_srs=28992&t_srs=25831&x=1.1000000&y=2.2000000)."); AssertReprojectedTo28992TestExtents(mapView); @@ -1315,9 +1315,9 @@ Assert.IsInstanceOf(mapView.Layers[0]); var pointFeatureLayer = (FeatureLayer) mapView.Layers[1]; Assert.IsTrue(mapView.Projection.Equals(pointFeatureLayer.Projection)); - Assert.AreEqual(523414.9114786592, pointFeatureLayer.FeatureSet.Features[0].Geometry.Coordinates[0].X, + Assert.AreEqual(523414.9114786592, pointFeatureLayer.FeatureSet.Features[0].BasicGeometry.Coordinates[0].X, "Coordinate does not match. (Ball park expected value can be calculated from https://epsg.io/transform#s_srs=28992&t_srs=25831&x=1.1000000&y=2.2000000)."); - Assert.AreEqual(5313600.4932731427, pointFeatureLayer.FeatureSet.Features[0].Geometry.Coordinates[0].Y, + Assert.AreEqual(5313600.4932731427, pointFeatureLayer.FeatureSet.Features[0].BasicGeometry.Coordinates[0].Y, "Coordinate does not match (Estimate of expected value can be calculated from https://epsg.io/transform#s_srs=28992&t_srs=25831&x=1.1000000&y=2.2000000)."); // When @@ -1331,8 +1331,8 @@ Assert.AreEqual(1, mapView.Layers.Count); pointFeatureLayer = (FeatureLayer) mapView.Layers[0]; Assert.IsTrue(mapView.Projection.Equals(pointFeatureLayer.Projection)); - Assert.AreEqual(1.1, pointFeatureLayer.FeatureSet.Features[0].Geometry.Coordinates[0].X); - Assert.AreEqual(2.2, pointFeatureLayer.FeatureSet.Features[0].Geometry.Coordinates[0].Y); + Assert.AreEqual(1.1, pointFeatureLayer.FeatureSet.Features[0].BasicGeometry.Coordinates[0].X); + Assert.AreEqual(2.2, pointFeatureLayer.FeatureSet.Features[0].BasicGeometry.Coordinates[0].Y); AssertOriginalExtents(mapView); } @@ -1364,9 +1364,9 @@ List featureLayers = mapView.Layers.Skip(1).Cast().ToList(); Assert.AreEqual("Points", featureLayers[0].Name); Assert.IsTrue(mapView.Projection.Equals(featureLayers[0].Projection)); - Assert.AreEqual(523414.9114786592, featureLayers[0].FeatureSet.Features[0].Geometry.Coordinates[0].X, + Assert.AreEqual(523414.9114786592, featureLayers[0].FeatureSet.Features[0].BasicGeometry.Coordinates[0].X, "Coordinate does not match. (Ball park expected value can be calculated from https://epsg.io/transform#s_srs=28992&t_srs=25831&x=1.1000000&y=2.2000000)."); - Assert.AreEqual(5313600.4932731427, featureLayers[0].FeatureSet.Features[0].Geometry.Coordinates[0].Y, + Assert.AreEqual(5313600.4932731427, featureLayers[0].FeatureSet.Features[0].BasicGeometry.Coordinates[0].Y, "Coordinate does not match (Estimate of expected value can be calculated from https://epsg.io/transform#s_srs=28992&t_srs=25831&x=1.1000000&y=2.2000000)."); Assert.AreEqual("Lines", featureLayers[1].Name); Assert.IsTrue(mapView.Projection.Equals(featureLayers[1].Projection)); @@ -1532,9 +1532,9 @@ IMapLayer[] layersBeforeUpdate = mapView.Layers.ToArray(); var pointFeatureLayer = (FeatureLayer) layersBeforeUpdate[1]; Assert.IsTrue(mapView.Projection.Equals(pointFeatureLayer.Projection)); - Assert.AreEqual(523414.9114786592, pointFeatureLayer.FeatureSet.Features[0].Geometry.Coordinates[0].X, + Assert.AreEqual(523414.9114786592, pointFeatureLayer.FeatureSet.Features[0].BasicGeometry.Coordinates[0].X, "Coordinate does not match. (Ball park expected value can be calculated from https://epsg.io/transform#s_srs=28992&t_srs=25831&x=1.1000000&y=2.2000000)."); - Assert.AreEqual(5313600.4932731427, pointFeatureLayer.FeatureSet.Features[0].Geometry.Coordinates[0].Y, + Assert.AreEqual(5313600.4932731427, pointFeatureLayer.FeatureSet.Features[0].BasicGeometry.Coordinates[0].Y, "Coordinate does not match (Estimate of expected value can be calculated from https://epsg.io/transform#s_srs=28992&t_srs=25831&x=1.1000000&y=2.2000000)."); Action callAction = () => @@ -1560,9 +1560,9 @@ // Then CollectionAssert.AreEqual(layersBeforeUpdate, mapView.Layers); Assert.IsTrue(mapView.Projection.Equals(pointFeatureLayer.Projection)); - Assert.AreEqual(535419.87415209203, pointFeatureLayer.FeatureSet.Features[0].Geometry.Coordinates[0].X, + Assert.AreEqual(535419.87415209203, pointFeatureLayer.FeatureSet.Features[0].BasicGeometry.Coordinates[0].X, "Coordinate does not match. (Ball park expected value can be calculated from https://epsg.io/transform#s_srs=28992&t_srs=25831&x=12345.6789000&y=9876.5432100)."); - Assert.AreEqual(5323846.0863087801, pointFeatureLayer.FeatureSet.Features[0].Geometry.Coordinates[0].Y, + Assert.AreEqual(5323846.0863087801, pointFeatureLayer.FeatureSet.Features[0].BasicGeometry.Coordinates[0].Y, "Coordinate does not match (Estimate of expected value can be calculated from https://epsg.io/transform#s_srs=28992&t_srs=25831&x=12345.6789000&y=9876.5432100)."); }; @@ -1911,8 +1911,8 @@ // Precondition Assert.AreEqual(1, mapView.Layers.Count); var pointFeatureLayer = (FeatureLayer) mapView.Layers[0]; - Assert.AreEqual(1.1, pointFeatureLayer.FeatureSet.Features[0].Geometry.Coordinates[0].X); - Assert.AreEqual(2.2, pointFeatureLayer.FeatureSet.Features[0].Geometry.Coordinates[0].Y); + Assert.AreEqual(1.1, pointFeatureLayer.FeatureSet.Features[0].BasicGeometry.Coordinates[0].X); + Assert.AreEqual(2.2, pointFeatureLayer.FeatureSet.Features[0].BasicGeometry.Coordinates[0].Y); // When map.BackgroundMapData = backgroundMapData; @@ -1922,9 +1922,9 @@ Assert.IsInstanceOf(mapView.Layers[0]); pointFeatureLayer = (FeatureLayer) mapView.Layers[1]; Assert.IsTrue(mapView.Projection.Equals(pointFeatureLayer.Projection)); - Assert.AreEqual(368865.09, pointFeatureLayer.FeatureSet.Features[0].Geometry.Coordinates[0].X, 1e-1, + Assert.AreEqual(368865.09, pointFeatureLayer.FeatureSet.Features[0].BasicGeometry.Coordinates[0].X, 1e-1, "Coordinate does not match. (Ball park expected value can be calculated from https://epsg.io/transform#s_srs=28992&t_srs=3857&x=1.1000000&y=2.2000000)."); - Assert.AreEqual(6102661.13, pointFeatureLayer.FeatureSet.Features[0].Geometry.Coordinates[0].Y, 1e-1, + Assert.AreEqual(6102661.13, pointFeatureLayer.FeatureSet.Features[0].BasicGeometry.Coordinates[0].Y, 1e-1, "Coordinate does not match (Estimate of expected value can be calculated from https://epsg.io/transform#s_srs=28992&t_srs=3857&x=1.1000000&y=2.2000000)."); AssertReprojectedTo3857TestExtents(mapView); Index: Core/Components/test/Core.Components.DotSpatial.Test/Converter/FeatureBasedMapDataConverterTest.cs =================================================================== diff -u -r168bc897d7ae116bb6e21d9c48669f9f4e708798 -rab2920cda5653e00b56c485ebdd2609404f114ae --- Core/Components/test/Core.Components.DotSpatial.Test/Converter/FeatureBasedMapDataConverterTest.cs (.../FeatureBasedMapDataConverterTest.cs) (revision 168bc897d7ae116bb6e21d9c48669f9f4e708798) +++ Core/Components/test/Core.Components.DotSpatial.Test/Converter/FeatureBasedMapDataConverterTest.cs (.../FeatureBasedMapDataConverterTest.cs) (revision ab2920cda5653e00b56c485ebdd2609404f114ae) @@ -36,9 +36,9 @@ using DotSpatial.Data; using DotSpatial.Projections; using DotSpatial.Symbology; -using GeoAPI.Geometries; using NUnit.Framework; using Rhino.Mocks; +using Point = DotSpatial.Topology.Point; namespace Core.Components.DotSpatial.Test.Converter { @@ -193,8 +193,8 @@ // Assert Assert.AreEqual(1, mapLayer.FeatureSet.Features.Count); - Assert.AreEqual(1.1, mapLayer.FeatureSet.Features[0].Geometry.Coordinates[0].X); - Assert.AreEqual(2.2, mapLayer.FeatureSet.Features[0].Geometry.Coordinates[0].Y); + 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); } @@ -220,8 +220,8 @@ // Assert Assert.AreEqual(1, mapLayer.FeatureSet.Features.Count); - Assert.AreEqual(1.1, mapLayer.FeatureSet.Features[0].Geometry.Coordinates[0].X); - Assert.AreEqual(2.2, mapLayer.FeatureSet.Features[0].Geometry.Coordinates[0].Y); + 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); } @@ -248,8 +248,8 @@ // Assert Assert.AreEqual(1, mapLayer.FeatureSet.Features.Count); - Assert.AreEqual(3.3135717854013329, mapLayer.FeatureSet.Features[0].Geometry.Coordinates[0].X); - Assert.AreEqual(47.974786294874853, mapLayer.FeatureSet.Features[0].Geometry.Coordinates[0].Y); + 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); } @@ -278,8 +278,8 @@ // Assert Assert.AreEqual(1, mapLayer.FeatureSet.Features.Count); - Assert.AreEqual(1.1, mapLayer.FeatureSet.Features[0].Geometry.Coordinates[0].X); - Assert.AreEqual(2.2, mapLayer.FeatureSet.Features[0].Geometry.Coordinates[0].Y); + 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); } @@ -835,7 +835,7 @@ protected override IEnumerable CreateFeatures(MapFeature mapFeature) { - yield return new Feature(new Coordinate(1.1, 2.2)); + yield return new Feature(new Point(1.1, 2.2)); } } } Index: Core/Components/test/Core.Components.DotSpatial.Test/Converter/MapLineDataConverterTest.cs =================================================================== diff -u -r168bc897d7ae116bb6e21d9c48669f9f4e708798 -rab2920cda5653e00b56c485ebdd2609404f114ae --- Core/Components/test/Core.Components.DotSpatial.Test/Converter/MapLineDataConverterTest.cs (.../MapLineDataConverterTest.cs) (revision 168bc897d7ae116bb6e21d9c48669f9f4e708798) +++ Core/Components/test/Core.Components.DotSpatial.Test/Converter/MapLineDataConverterTest.cs (.../MapLineDataConverterTest.cs) (revision ab2920cda5653e00b56c485ebdd2609404f114ae) @@ -35,8 +35,7 @@ using DotSpatial.Controls; using DotSpatial.Data; using DotSpatial.Symbology; -using GeoAPI.Geometries; -using NetTopologySuite.Geometries; +using DotSpatial.Topology; using NUnit.Framework; using Rhino.Mocks; using LineStyle = Core.Components.Gis.Style.LineStyle; @@ -113,11 +112,11 @@ // Assert IFeature feature = mapLineLayer.DataSet.Features[0]; Assert.AreEqual(mapLineData.Features.Count(), mapLineLayer.DataSet.Features.Count); - Assert.IsInstanceOf(feature.Geometry); + Assert.IsInstanceOf(feature.BasicGeometry); IEnumerable expectedCoordinates = mapFeature.MapGeometries.ElementAt(0).PointCollections.ElementAt(0) .Select(p => new Coordinate(p.X, p.Y)); - CollectionAssert.AreEqual(expectedCoordinates, feature.Geometry.Coordinates); + CollectionAssert.AreEqual(expectedCoordinates, feature.Coordinates); } [Test] @@ -163,10 +162,10 @@ // Assert IFeature feature = mapLineLayer.DataSet.Features[0]; Assert.AreEqual(mapLineData.Features.Count(), mapLineLayer.DataSet.Features.Count); - Assert.IsInstanceOf(feature.Geometry); + Assert.IsInstanceOf(feature.BasicGeometry); IEnumerable expectedCoordinates = mapFeature.MapGeometries.SelectMany(mg => mg.PointCollections.ElementAt(0).Select(p => new Coordinate(p.X, p.Y))); - CollectionAssert.AreEqual(expectedCoordinates, feature.Geometry.Coordinates); + CollectionAssert.AreEqual(expectedCoordinates, feature.Coordinates); } [Test] Index: Core/Components/test/Core.Components.DotSpatial.Test/Converter/MapPointDataConverterTest.cs =================================================================== diff -u -r168bc897d7ae116bb6e21d9c48669f9f4e708798 -rab2920cda5653e00b56c485ebdd2609404f114ae --- Core/Components/test/Core.Components.DotSpatial.Test/Converter/MapPointDataConverterTest.cs (.../MapPointDataConverterTest.cs) (revision 168bc897d7ae116bb6e21d9c48669f9f4e708798) +++ Core/Components/test/Core.Components.DotSpatial.Test/Converter/MapPointDataConverterTest.cs (.../MapPointDataConverterTest.cs) (revision ab2920cda5653e00b56c485ebdd2609404f114ae) @@ -145,10 +145,10 @@ // Assert IFeature feature = mapPointLayer.DataSet.Features[0]; Assert.AreEqual(mapPointData.Features.Count(), mapPointLayer.DataSet.Features.Count); - Assert.IsInstanceOf(feature.Geometry); + Assert.IsInstanceOf(feature.BasicGeometry); IEnumerable expectedCoordinates = mapFeature.MapGeometries.ElementAt(0).PointCollections.ElementAt(0).Select(p => new Coordinate(p.X, p.Y)); - CollectionAssert.AreEqual(expectedCoordinates, feature.Geometry.Coordinates); + CollectionAssert.AreEqual(expectedCoordinates, feature.Coordinates); } [Test] Index: Core/Components/test/Core.Components.DotSpatial.Test/Converter/MapPolygonDataConverterTest.cs =================================================================== diff -u -r168bc897d7ae116bb6e21d9c48669f9f4e708798 -rab2920cda5653e00b56c485ebdd2609404f114ae --- Core/Components/test/Core.Components.DotSpatial.Test/Converter/MapPolygonDataConverterTest.cs (.../MapPolygonDataConverterTest.cs) (revision 168bc897d7ae116bb6e21d9c48669f9f4e708798) +++ Core/Components/test/Core.Components.DotSpatial.Test/Converter/MapPolygonDataConverterTest.cs (.../MapPolygonDataConverterTest.cs) (revision ab2920cda5653e00b56c485ebdd2609404f114ae) @@ -102,10 +102,10 @@ // Assert IFeature feature = mapPolygonLayer.DataSet.Features[0]; Assert.AreEqual(mapPolygonData.Features.Count(), mapPolygonLayer.DataSet.Features.Count); - Assert.IsInstanceOf(feature.Geometry); + Assert.IsInstanceOf(feature.BasicGeometry); IEnumerable expectedCoordinates = mapPolygonData.Features.First().MapGeometries.First().PointCollections.First().Select(p => new Coordinate(p.X, p.Y)); - CollectionAssert.AreEqual(expectedCoordinates, mapPolygonLayer.DataSet.Features[0].Geometry.Coordinates); + CollectionAssert.AreEqual(expectedCoordinates, mapPolygonLayer.DataSet.Features[0].Coordinates); } [Test] @@ -140,10 +140,10 @@ // Assert IFeature feature = mapPolygonLayer.DataSet.Features[0]; Assert.AreEqual(mapPolygonData.Features.Count(), mapPolygonLayer.DataSet.Features.Count); - Assert.IsInstanceOf(feature.Geometry); + Assert.IsInstanceOf(feature.BasicGeometry); IEnumerable expectedCoordinates = mapFeature.MapGeometries.SelectMany(mg => mg.PointCollections.ElementAt(0).Select(p => new Coordinate(p.X, p.Y))); - CollectionAssert.AreEqual(expectedCoordinates, feature.Geometry.Coordinates); + CollectionAssert.AreEqual(expectedCoordinates, feature.Coordinates); } [Test] @@ -174,9 +174,9 @@ // Assert IFeature feature = mapPolygonLayer.DataSet.Features[0]; Assert.AreEqual(mapPolygonData.Features.Count(), mapPolygonLayer.DataSet.Features.Count); - Assert.IsInstanceOf(feature.Geometry); + Assert.IsInstanceOf(feature.BasicGeometry); - var polygonGeometry = (Polygon) mapPolygonLayer.FeatureSet.Features[0].Geometry; + var polygonGeometry = (Polygon) mapPolygonLayer.FeatureSet.Features[0].BasicGeometry; Assert.AreEqual(1, polygonGeometry.NumGeometries); CollectionAssert.AreEqual(outerRingPoints, polygonGeometry.Shell.Coordinates.Select(c => new Point2D(c.X, c.Y))); CollectionAssert.IsEmpty(polygonGeometry.Holes); @@ -214,9 +214,9 @@ // Assert IFeature feature = mapPolygonLayer.DataSet.Features[0]; Assert.AreEqual(mapPolygonData.Features.Count(), mapPolygonLayer.DataSet.Features.Count); - Assert.IsInstanceOf(feature.Geometry); + Assert.IsInstanceOf(feature.BasicGeometry); - var polygonGeometry = (Polygon) mapPolygonLayer.FeatureSet.Features[0].Geometry; + var polygonGeometry = (Polygon) mapPolygonLayer.FeatureSet.Features[0].BasicGeometry; Assert.AreEqual(1, polygonGeometry.NumGeometries); CollectionAssert.AreEqual(outerRingPoints, polygonGeometry.Shell.Coordinates.Select(c => new Point2D(c.X, c.Y))); Assert.AreEqual(2, polygonGeometry.Holes.Length); Index: Core/Components/test/Core.Components.DotSpatial.Test/Core.Components.DotSpatial.Test.csproj =================================================================== diff -u -r168bc897d7ae116bb6e21d9c48669f9f4e708798 -rab2920cda5653e00b56c485ebdd2609404f114ae --- Core/Components/test/Core.Components.DotSpatial.Test/Core.Components.DotSpatial.Test.csproj (.../Core.Components.DotSpatial.Test.csproj) (revision 168bc897d7ae116bb6e21d9c48669f9f4e708798) +++ Core/Components/test/Core.Components.DotSpatial.Test/Core.Components.DotSpatial.Test.csproj (.../Core.Components.DotSpatial.Test.csproj) (revision ab2920cda5653e00b56c485ebdd2609404f114ae) @@ -72,20 +72,17 @@ 2.1.2 - - - - - - + + + + + - - - - - - - + + + + + 3.8.1 Index: Core/Components/test/Core.Components.DotSpatial.Test/MapFunctions/MapFunctionSelectionZoomTest.cs =================================================================== diff -u -r168bc897d7ae116bb6e21d9c48669f9f4e708798 -rab2920cda5653e00b56c485ebdd2609404f114ae --- Core/Components/test/Core.Components.DotSpatial.Test/MapFunctions/MapFunctionSelectionZoomTest.cs (.../MapFunctionSelectionZoomTest.cs) (revision 168bc897d7ae116bb6e21d9c48669f9f4e708798) +++ Core/Components/test/Core.Components.DotSpatial.Test/MapFunctions/MapFunctionSelectionZoomTest.cs (.../MapFunctionSelectionZoomTest.cs) (revision ab2920cda5653e00b56c485ebdd2609404f114ae) @@ -27,7 +27,7 @@ using DotSpatial.Controls; using DotSpatial.Data; using DotSpatial.Symbology; -using GeoAPI.Geometries; +using DotSpatial.Topology; using NUnit.Framework; using Rhino.Mocks; using Point = System.Drawing.Point; Index: Core/Components/test/Core.Components.DotSpatial.Test/Projections/ReprojectExtensionsTest.cs =================================================================== diff -u -r168bc897d7ae116bb6e21d9c48669f9f4e708798 -rab2920cda5653e00b56c485ebdd2609404f114ae --- Core/Components/test/Core.Components.DotSpatial.Test/Projections/ReprojectExtensionsTest.cs (.../ReprojectExtensionsTest.cs) (revision 168bc897d7ae116bb6e21d9c48669f9f4e708798) +++ Core/Components/test/Core.Components.DotSpatial.Test/Projections/ReprojectExtensionsTest.cs (.../ReprojectExtensionsTest.cs) (revision ab2920cda5653e00b56c485ebdd2609404f114ae) @@ -26,8 +26,7 @@ using Core.Components.DotSpatial.Projections; using DotSpatial.Data; using DotSpatial.Projections; -using GeoAPI.Geometries; -using NetTopologySuite.Geometries; +using DotSpatial.Topology; using NUnit.Framework; namespace Core.Components.DotSpatial.Test.Projections @@ -107,11 +106,12 @@ // Setup IEnumerable coordinates = Enumerable.Range(0, numberOfPoints) .Select(i => new Coordinate(i, i)); - var linearRing = new LinearRing(new Coordinate[1]); + var linearRing = new LinearRing(Enumerable.Empty()); + foreach (Coordinate coordinate in coordinates) + { + linearRing.Coordinates.Add(coordinate); + } - - linearRing.Coordinates.Concat(coordinates.ToArray()); - ProjectionInfo projection = KnownCoordinateSystems.Projected.NationalGrids.Rijksdriehoekstelsel; // Call @@ -147,7 +147,7 @@ // Assert const int numberOfEdges = 3; const int expectedNumberOfExtraPoints = 35; - Assert.AreEqual(numberOfEdges * expectedNumberOfExtraPoints + numberOfEdges + 1, reprojectedRing.Coordinates.Length); + Assert.AreEqual(numberOfEdges * expectedNumberOfExtraPoints + numberOfEdges + 1, reprojectedRing.Coordinates.Count); const double allowedError = 1e-6; // Allow small drift in reprojecting to same coordinate system. @@ -196,7 +196,7 @@ // Assert const int numberOfEdges = 3; const int expectedNumberOfExtraPoints = 35; - Assert.AreEqual(numberOfEdges * expectedNumberOfExtraPoints + numberOfEdges + 1, reprojectedRing.Coordinates.Length); + Assert.AreEqual(numberOfEdges * expectedNumberOfExtraPoints + numberOfEdges + 1, reprojectedRing.Coordinates.Count); const double allowedError = 1e-6; @@ -240,7 +240,7 @@ // Assert const int numberOfEdges = 3; const int expectedNumberOfExtraPoints = 35; - Assert.AreEqual(numberOfEdges * expectedNumberOfExtraPoints + numberOfEdges + 1, reprojectedRing.Coordinates.Length); + Assert.AreEqual(numberOfEdges * expectedNumberOfExtraPoints + numberOfEdges + 1, reprojectedRing.Coordinates.Count); const double allowedError = 1e-6; // Allow small drift in reprojecting to same coordinate system. Index: Core/Components/test/Core.Components.DotSpatial.Test/Projections/WorldFileTest.cs =================================================================== diff -u -r168bc897d7ae116bb6e21d9c48669f9f4e708798 -rab2920cda5653e00b56c485ebdd2609404f114ae --- Core/Components/test/Core.Components.DotSpatial.Test/Projections/WorldFileTest.cs (.../WorldFileTest.cs) (revision 168bc897d7ae116bb6e21d9c48669f9f4e708798) +++ Core/Components/test/Core.Components.DotSpatial.Test/Projections/WorldFileTest.cs (.../WorldFileTest.cs) (revision ab2920cda5653e00b56c485ebdd2609404f114ae) @@ -22,7 +22,7 @@ using System; using Core.Common.TestUtil; using Core.Components.DotSpatial.Projections; -using GeoAPI.Geometries; +using DotSpatial.Topology; using NUnit.Framework; using Point = System.Drawing.Point; Index: Core/Components/test/Core.Components.Gis.IO.Test/Core.Components.Gis.IO.Test.csproj =================================================================== diff -u -r168bc897d7ae116bb6e21d9c48669f9f4e708798 -rab2920cda5653e00b56c485ebdd2609404f114ae --- Core/Components/test/Core.Components.Gis.IO.Test/Core.Components.Gis.IO.Test.csproj (.../Core.Components.Gis.IO.Test.csproj) (revision 168bc897d7ae116bb6e21d9c48669f9f4e708798) +++ Core/Components/test/Core.Components.Gis.IO.Test/Core.Components.Gis.IO.Test.csproj (.../Core.Components.Gis.IO.Test.csproj) (revision ab2920cda5653e00b56c485ebdd2609404f114ae) @@ -24,20 +24,17 @@ - - - - - - + + + + + - - - - - - - + + + + + 3.8.1 Index: Core/Plugins/test/Core.Plugins.Map.Test/Core.Plugins.Map.Test.csproj =================================================================== diff -u -r168bc897d7ae116bb6e21d9c48669f9f4e708798 -rab2920cda5653e00b56c485ebdd2609404f114ae --- Core/Plugins/test/Core.Plugins.Map.Test/Core.Plugins.Map.Test.csproj (.../Core.Plugins.Map.Test.csproj) (revision 168bc897d7ae116bb6e21d9c48669f9f4e708798) +++ Core/Plugins/test/Core.Plugins.Map.Test/Core.Plugins.Map.Test.csproj (.../Core.Plugins.Map.Test.csproj) (revision ab2920cda5653e00b56c485ebdd2609404f114ae) @@ -35,20 +35,17 @@ - - - - - - + + + + + - - - - - - - + + + + + 3.4.0