Index: Core/Components/src/Core.Components.DotSpatial/Converter/FeatureBasedMapDataConverter.cs
===================================================================
diff -u -r96ead5fb68a31e1491693e187045d11b9569e2e6 -r84f485ecc4a35c79575db43f9c083974965dde7d
--- Core/Components/src/Core.Components.DotSpatial/Converter/FeatureBasedMapDataConverter.cs (.../FeatureBasedMapDataConverter.cs) (revision 96ead5fb68a31e1491693e187045d11b9569e2e6)
+++ Core/Components/src/Core.Components.DotSpatial/Converter/FeatureBasedMapDataConverter.cs (.../FeatureBasedMapDataConverter.cs) (revision 84f485ecc4a35c79575db43f9c083974965dde7d)
@@ -140,12 +140,11 @@
protected abstract IFeatureCategory CreateDefaultCategory(TFeatureBasedMapData mapData);
///
- /// Converts an of to an
- /// of .
+ /// Converts an of to a array.
///
/// The of to convert.
- /// The converted of .
- protected static IEnumerable ConvertPoint2DElementsToCoordinates(IEnumerable points)
+ /// The converted array.
+ protected static Coordinate[] ConvertPoint2DElementsToCoordinates(IEnumerable points)
{
return points.Select(point => new Coordinate(point.X, point.Y)).ToArray();
}
Index: Core/Components/src/Core.Components.DotSpatial/Converter/MapLineDataConverter.cs
===================================================================
diff -u -r96ead5fb68a31e1491693e187045d11b9569e2e6 -r84f485ecc4a35c79575db43f9c083974965dde7d
--- Core/Components/src/Core.Components.DotSpatial/Converter/MapLineDataConverter.cs (.../MapLineDataConverter.cs) (revision 96ead5fb68a31e1491693e187045d11b9569e2e6)
+++ Core/Components/src/Core.Components.DotSpatial/Converter/MapLineDataConverter.cs (.../MapLineDataConverter.cs) (revision 84f485ecc4a35c79575db43f9c083974965dde7d)
@@ -100,7 +100,7 @@
private static ILineString GetLineString(IGeometryFactory factory, IEnumerable points)
{
- Coordinate[] coordinates = points.Select(point => new Coordinate(point.X, point.Y)).ToArray();
+ Coordinate[] coordinates = ConvertPoint2DElementsToCoordinates(points).ToArray();
return factory.CreateLineString(coordinates);
}
}
Index: Core/Components/src/Core.Components.DotSpatial/Converter/MapPolygonDataConverter.cs
===================================================================
diff -u -rbf8a39dac99b87d4e75a2e68548c6e7f6a1f398c -r84f485ecc4a35c79575db43f9c083974965dde7d
--- Core/Components/src/Core.Components.DotSpatial/Converter/MapPolygonDataConverter.cs (.../MapPolygonDataConverter.cs) (revision bf8a39dac99b87d4e75a2e68548c6e7f6a1f398c)
+++ Core/Components/src/Core.Components.DotSpatial/Converter/MapPolygonDataConverter.cs (.../MapPolygonDataConverter.cs) (revision 84f485ecc4a35c79575db43f9c083974965dde7d)
@@ -57,7 +57,7 @@
var innerRings = new ILinearRing[pointCollections.Length - 1];
for (var i = 1; i < pointCollections.Length; i++)
{
- Coordinate[] innerRingCoordinates = ConvertPoint2DElementsToCoordinates(pointCollections[i]).ToArray();
+ Coordinate[] innerRingCoordinates = ConvertPoint2DElementsToCoordinates(pointCollections[i]);
innerRings[i - 1] = new LinearRing(innerRingCoordinates);
}
Index: Core/Components/src/Core.Components.DotSpatial/Projections/ReprojectExtensions.cs
===================================================================
diff -u -rbf8a39dac99b87d4e75a2e68548c6e7f6a1f398c -r84f485ecc4a35c79575db43f9c083974965dde7d
--- Core/Components/src/Core.Components.DotSpatial/Projections/ReprojectExtensions.cs (.../ReprojectExtensions.cs) (revision bf8a39dac99b87d4e75a2e68548c6e7f6a1f398c)
+++ Core/Components/src/Core.Components.DotSpatial/Projections/ReprojectExtensions.cs (.../ReprojectExtensions.cs) (revision 84f485ecc4a35c79575db43f9c083974965dde7d)
@@ -148,24 +148,24 @@
/// A value of 4 of means that 3 equally spaced
/// points are introduced along the line between two instances
/// in .
- private static IList Densify(this IList original, int intervals)
+ private static Coordinate[] Densify(this IList original, int intervals)
{
return GetDensifiedCoordinates(original, intervals - 1);
}
- private static IList GetDensifiedCoordinates(IList original, int numberOfAdditionalPoints)
+ private static Coordinate[] GetDensifiedCoordinates(IList original, int numberOfAdditionalPoints)
{
int numberOfEdges = original.Count - 1;
- var resultList = new List(numberOfEdges * (numberOfAdditionalPoints + 1) + 1)
+ Coordinate[] results =
{
original[0]
};
for (var i = 1; i <= numberOfEdges; i++)
{
- resultList.AddRange(GetEdgePointsExcludingStart(original[i - 1], original[i], numberOfAdditionalPoints));
+ results = results.Concat(GetEdgePointsExcludingStart(original[i - 1], original[i], numberOfAdditionalPoints)).ToArray();
}
- return resultList;
+ return results;
}
private static IEnumerable GetEdgePointsExcludingStart(Coordinate start, Coordinate end, int numberOfAdditionalPoints)
Index: Core/Components/test/Core.Components.DotSpatial.Test/Projections/ReprojectExtensionsTest.cs
===================================================================
diff -u -rbf8a39dac99b87d4e75a2e68548c6e7f6a1f398c -r84f485ecc4a35c79575db43f9c083974965dde7d
--- Core/Components/test/Core.Components.DotSpatial.Test/Projections/ReprojectExtensionsTest.cs (.../ReprojectExtensionsTest.cs) (revision bf8a39dac99b87d4e75a2e68548c6e7f6a1f398c)
+++ Core/Components/test/Core.Components.DotSpatial.Test/Projections/ReprojectExtensionsTest.cs (.../ReprojectExtensionsTest.cs) (revision 84f485ecc4a35c79575db43f9c083974965dde7d)
@@ -22,7 +22,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using Core.Common.TestUtil;
using Core.Components.DotSpatial.Projections;
using DotSpatial.Data;
using DotSpatial.Projections;