private void AssertCompositeResultHasLeafSubResults( CrsTransformationAdapterComposite compositeAdapter, int expectedNumberOfLeafResults ) { CrsTransformationResult compositeTransformResult = compositeAdapter.Transform(inputCoordinateSweref99, crsIdentifierWGS84); Assert.IsNotNull(compositeTransformResult); Assert.IsTrue(compositeTransformResult.IsSuccess); //assertEquals(expectedNumberOfLeafResults, allLeafAdapters.size()); // five "leafs" were used to calculate the composite Assert.AreEqual(expectedNumberOfLeafResults, compositeTransformResult.TransformationResultChildren.Count); IList <CrsTransformationResult> subResults = compositeTransformResult.TransformationResultChildren; for (int i = 0; i < subResults.Count; i++) { CrsTransformationResult transformResult = subResults[i]; ICrsTransformationAdapter leafAdapter = allLeafAdapters[i]; CrsTransformationResult transformResultForLeaf = leafAdapter.Transform(inputCoordinateSweref99, crsIdentifierWGS84); Assert.IsNotNull(transformResultForLeaf); Assert.IsTrue(transformResultForLeaf.IsSuccess); AssertEqualCoordinate(transformResult.OutputCoordinate, transformResultForLeaf.OutputCoordinate); Assert.AreEqual(0, transformResultForLeaf.TransformationResultChildren.Count); // no subresults for a leaf } }
public void TransformToCoordinate_ShouldReturnFirstResult_WhenUsingFirstSuccessCompositeAdapter() { CrsTransformationAdapterComposite firstSuccessCompositeAdapter = crsTransformationAdapterCompositeFactory.CreateCrsTransformationFirstSuccess(allLeafAdapters); CrsCoordinate resultCoordinate = firstSuccessCompositeAdapter.TransformToCoordinate(inputCoordinateSweref99, EpsgNumber.WORLD__WGS_84__4326); Assert.IsNotNull(resultCoordinate); // The assumption below (according to the setup code in the "before" method in this JUnit class) // is that the first adapter in the above list allLeafAdapters will return the result outputCoordinateWgs84ForImplementation_1 Assert.AreEqual( outputCoordinateWgs84ForImplementation_1.YNorthingLatitude, resultCoordinate.YNorthingLatitude, SMALL_DELTA_VALUE_FOR_COMPARISONS ); Assert.AreEqual( outputCoordinateWgs84ForImplementation_1.XEastingLongitude, resultCoordinate.XEastingLongitude, SMALL_DELTA_VALUE_FOR_COMPARISONS ); AssertCompositeResultHasLeafSubResults( firstSuccessCompositeAdapter, 1 // expectedNumberOfLeafResults ); }
public void Transform_ShouldReturnWeightedAverageResult_WhenUsingWeightedAverageCompositeAdapter() { var weights = new List <CrsTransformationAdapterWeight> { weightFactory.CreateFromInstance(new CrsTransformationAdapterDotSpatial(), weightForDotSpatial), weightFactory.CreateFromInstance(new CrsTransformationAdapterProjNet(), weightForProjNet), weightFactory.CreateFromInstance(new CrsTransformationAdapterMightyLittleGeodesy(), weightForMightyLittleGeodesy) }; CrsTransformationAdapterComposite adapter = crsTransformationAdapterCompositeFactory.CreateCrsTransformationWeightedAverage(weights); AssertWeightedAverageResult(adapter); }
public void Transform_ShouldReturnWeightedAverageResult_WhenUsingWeightedAverageCompositeAdapterAndLeafsInstantiatedFromStringsWithClassNames() { string classNameadapterDotSpatial = adapterDotSpatial.LongNameOfImplementation; string classNameProjNet = adapterProjNet.LongNameOfImplementation; string classNameMightyLittleGeodesy = adapterMightyLittleGeodesy.LongNameOfImplementation; List <CrsTransformationAdapterWeight> weights = new List <CrsTransformationAdapterWeight> { weightFactory.CreateFromStringWithFullClassNameForImplementation(classNameadapterDotSpatial, weightForDotSpatial), weightFactory.CreateFromStringWithFullClassNameForImplementation(classNameProjNet, weightForProjNet), weightFactory.CreateFromStringWithFullClassNameForImplementation(classNameMightyLittleGeodesy, weightForMightyLittleGeodesy) }; CrsTransformationAdapterComposite weightedAverageCompositeAdapter = crsTransformationAdapterCompositeFactory.CreateCrsTransformationWeightedAverage(weights); AssertWeightedAverageResult(weightedAverageCompositeAdapter); }
private void verifyThreeImplementations( CrsTransformationAdapterComposite crsTransformationAdapterComposite ) { CrsCoordinate input = CrsCoordinateFactory.LatLon(59.0, 18.0); CrsTransformationResult result = crsTransformationAdapterComposite.Transform(input, EpsgNumber.SWEDEN__SWEREF99_TM__3006); Assert.IsNotNull(result); Assert.IsTrue(result.IsSuccess); const int numberOfImplementations = CrsTransformationAdapterTest.EXPECTED_NUMBER_OF_ADAPTER_LEAF_IMPLEMENTATIONS; Assert.AreEqual(numberOfImplementations, result.TransformationResultChildren.Count); CrsTransformationResultStatistic crsTransformationResultStatistic = result.CrsTransformationResultStatistic; Assert.IsNotNull(crsTransformationResultStatistic); Assert.IsTrue(crsTransformationResultStatistic.IsStatisticsAvailable); Assert.AreEqual(numberOfImplementations, crsTransformationResultStatistic.NumberOfPotentiallySuccesfulResults); Assert.That(crsTransformationResultStatistic.MaxDifferenceForXEastingLongitude, Is.LessThan(0.001)); }
public void TransformToCoordinate_ShouldReturnWeightedAverageResult_WhenUsingWeightedAverageCompositeAdapter() { double[] weights = { 1, 2, 4, 5, 9 }; double totWeights = 0; double totLats = 0; double totLons = 0; for (int i = 0; i < weights.Length; i++) { double weight = weights[i]; totWeights += weight; CrsCoordinate coordinate = outputCoordinates[i]; totLats += weight * coordinate.YNorthingLatitude; totLons += weight * coordinate.XEastingLongitude; } double weightedLat = totLats / totWeights; double weightedLon = totLons / totWeights; CrsCoordinate expectedWeightedAverage = CrsCoordinateFactory.CreateFromLatitudeLongitude(weightedLat, weightedLon); List <CrsTransformationAdapterWeight> weightedAdapters = new List <CrsTransformationAdapterWeight> { weightFactory.CreateFromInstance(leafAdapterImplementation_1, weights[0]), weightFactory.CreateFromInstance(leafAdapterImplementation_2, weights[1]), weightFactory.CreateFromInstance(leafAdapterImplementation_3, weights[2]), weightFactory.CreateFromInstance(leafAdapterImplementation_4, weights[3]), weightFactory.CreateFromInstance(leafAdapterImplementation_5, weights[4]) }; CrsTransformationAdapterComposite weightedAverageCompositeAdapter = crsTransformationAdapterCompositeFactory.CreateCrsTransformationWeightedAverage(weightedAdapters); CrsCoordinate result = weightedAverageCompositeAdapter.TransformToCoordinate(inputCoordinateSweref99, EpsgNumber.WORLD__WGS_84__4326); Assert.IsNotNull(result); Assert.AreEqual(expectedWeightedAverage.YNorthingLatitude, result.YNorthingLatitude, SMALL_DELTA_VALUE_FOR_COMPARISONS); Assert.AreEqual(expectedWeightedAverage.XEastingLongitude, result.XEastingLongitude, SMALL_DELTA_VALUE_FOR_COMPARISONS); AssertCompositeResultHasLeafSubResults( weightedAverageCompositeAdapter, allLeafAdapters.Count ); }
public void SetUp() { weightFactory = CrsTransformationAdapterWeightFactory.Create(); // Leaf adapters: dotSpatial = new CrsTransformationAdapterDotSpatial(); mightyLittleGeodesy = new CrsTransformationAdapterMightyLittleGeodesy(); // currently there are no configurations possibilities for the above two leafs // but for the below leaf it is possible to create instances with // different configurations projNet = new CrsTransformationAdapterProjNet(); ProjNetWithDifferentConfiguration = new CrsTransformationAdapterProjNet(new SridReader("somepath.csv")); // Composite adapters: crsTransformationAdapterCompositeFactory = CrsTransformationAdapterCompositeFactory.Create( new List <ICrsTransformationAdapter> { dotSpatial, mightyLittleGeodesy, projNet } ); // Note that below list parameter is the same as the above but with the list items in reversed order crsTransformationAdapterCompositeFactoryWithLeafsInReversedOrder = CrsTransformationAdapterCompositeFactory.Create( new List <ICrsTransformationAdapter> { projNet, mightyLittleGeodesy, dotSpatial } ); crsTransformationAdapterCompositeFactoryWithOneLeafDifferentlyConfigured = CrsTransformationAdapterCompositeFactory.Create( new List <ICrsTransformationAdapter> { dotSpatial, mightyLittleGeodesy, ProjNetWithDifferentConfiguration } ); average = crsTransformationAdapterCompositeFactory.CreateCrsTransformationAverage(); median = crsTransformationAdapterCompositeFactory.CreateCrsTransformationMedian(); firstSuccess = crsTransformationAdapterCompositeFactory.CreateCrsTransformationFirstSuccess(); weightedAverage = crsTransformationAdapterCompositeFactory.CreateCrsTransformationWeightedAverage(new List <CrsTransformationAdapterWeight> { weightFactory.CreateFromInstance(dotSpatial, 1.0), weightFactory.CreateFromInstance(projNet, 2.0), weightFactory.CreateFromInstance(mightyLittleGeodesy, 3.0) }); }
private void AssertWeightedAverageResult( CrsTransformationAdapterComposite weightedAverageCompositeAdapter ) { CrsTransformationResult weightedAverageResult = weightedAverageCompositeAdapter.Transform(wgs84coordinate, EpsgNumber.SWEDEN__SWEREF99_TM__3006); Assert.IsNotNull(weightedAverageResult); Assert.IsTrue(weightedAverageResult.IsSuccess); Assert.AreEqual(base.allCoordinateResultsForTheDifferentImplementations.Count, weightedAverageResult.TransformationResultChildren.Count); CrsCoordinate weightedAverageCoordinate = weightedAverageResult.OutputCoordinate; Assert.AreEqual(coordinateWithExpectedWeightedValues.YNorthingLatitude, weightedAverageCoordinate.YNorthingLatitude, SMALL_DELTA_VALUE); Assert.AreEqual(coordinateWithExpectedWeightedValues.XEastingLongitude, weightedAverageCoordinate.XEastingLongitude, SMALL_DELTA_VALUE); // The logic for the tests below: // The tested result should of course be very close to the expected result, // i.e. the differences (longitude and latitude differences) // // should be less than a very small SMALL_DELTA_VALUE value double diffLatTestedAdapter = Math.Abs(coordinateWithExpectedWeightedValues.YNorthingLatitude - weightedAverageCoordinate.YNorthingLatitude); double diffLonTestedAdapter = Math.Abs(coordinateWithExpectedWeightedValues.XEastingLongitude - weightedAverageCoordinate.XEastingLongitude); Assert.That(diffLatTestedAdapter, Is.LessThan(SMALL_DELTA_VALUE));// assertTrue(diffLatTestedAdapter < SMALL_DELTA_VALUE); Assert.That(diffLonTestedAdapter, Is.LessThan(SMALL_DELTA_VALUE)); // Now in the rest of the assertions below, // the difference between the individual results which were weighted // should not be quite as close to that same small SMALL_DELTA_VALUE value, // and thus the assertions below are that the difference should be greater // than the SMALL_DELTA_VALUE value. // Of course, in theory some of the individual values below might // come very very close to the weighted result, and then some assertion might fail. // However, it turned out to not be like that with the chosen test values, // and thus they are asserted here as part of regression testing. // If this test would break, it needs to be investigated since these values // have been working fine to assert like below. AssertDiffsAreGreaterThanSmallDelta(resultCoordinateDotSpatial, coordinateWithExpectedWeightedValues); AssertDiffsAreGreaterThanSmallDelta(resultCoordinateMightyLittleGeodesy, coordinateWithExpectedWeightedValues); AssertDiffsAreGreaterThanSmallDelta(resultCoordinateProjNet, coordinateWithExpectedWeightedValues); }
public void IsReliableTest() { var crsTransformationAdapterCompositeFactory = CrsTransformationAdapterCompositeFactory.Create(); CrsTransformationAdapterComposite crsTransformationComposite = crsTransformationAdapterCompositeFactory.CreateCrsTransformationAverage(); var children = crsTransformationComposite.TransformationAdapterChildren; Assert.AreEqual(3, children.Count); CrsCoordinate wgs84coordinateInSweden = CrsCoordinateFactory.LatLon(59.31, 18.04); CrsTransformationResult resultWhenTransformingToSwedishCRS = crsTransformationComposite.Transform(wgs84coordinateInSweden, EpsgNumber.SWEDEN__SWEREF99_TM__3006); Assert.IsNotNull(resultWhenTransformingToSwedishCRS); Assert.IsTrue(resultWhenTransformingToSwedishCRS.IsSuccess); CrsTransformationResultStatistic crsTransformationResultStatistic = resultWhenTransformingToSwedishCRS.CrsTransformationResultStatistic; Assert.IsNotNull(crsTransformationResultStatistic); Assert.IsTrue(crsTransformationResultStatistic.IsStatisticsAvailable); int actualNumberOfResults = crsTransformationResultStatistic.NumberOfPotentiallySuccesfulResults; Assert.AreEqual( EXPECTED_NUMBER_OF_ADAPTER_LEAF_IMPLEMENTATIONS, actualNumberOfResults ); double actualMaxDiffXLongitude = crsTransformationResultStatistic.MaxDifferenceForXEastingLongitude; double actualMaxDiffYLatitude = crsTransformationResultStatistic.MaxDifferenceForYNorthingLatitude; double actualMaxDiffXorY = Math.Max(actualMaxDiffXLongitude, actualMaxDiffYLatitude); Assert.That(actualMaxDiffXorY, Is.LessThan(0.01)); Assert.IsTrue(resultWhenTransformingToSwedishCRS.IsReliable(actualNumberOfResults, actualMaxDiffXorY)); // assertFalse below since trying to require one more result than available Assert.IsFalse(resultWhenTransformingToSwedishCRS.IsReliable(actualNumberOfResults + 1, actualMaxDiffXorY)); // assertFalse below since trying to require too small maxdiff Assert.IsFalse(resultWhenTransformingToSwedishCRS.IsReliable(actualNumberOfResults, actualMaxDiffXorY - 0.00000000001)); }
public void TransformToCoordinate_ShouldReturnMedianResult_WhenUsingMedianCompositeAdapter() { CrsTransformationAdapterComposite medianCompositeAdapter = crsTransformationAdapterCompositeFactory.CreateCrsTransformationMedian(allLeafAdapters); CrsCoordinate resultCoordinate = medianCompositeAdapter.TransformToCoordinate(inputCoordinateSweref99, EpsgNumber.WORLD__WGS_84__4326); Assert.IsNotNull(resultCoordinate); Assert.AreEqual( expectedMedianLatitude, resultCoordinate.YNorthingLatitude, SMALL_DELTA_VALUE_FOR_COMPARISONS ); Assert.AreEqual( expectedMedianLongitude, resultCoordinate.XEastingLongitude, SMALL_DELTA_VALUE_FOR_COMPARISONS ); AssertCompositeResultHasLeafSubResults( medianCompositeAdapter, allLeafAdapters.Count // expectedNumberOfLeafResults ); }
public void TransformToCoordinateWithComposite_ShouldAggregateAsExpected_WhenTheLeafsAreAlsoCompositesAndNestedAtManyLevels() { // The method first creates two composites (average and success) // and then uses those two composites as leafs for a // weighted average composite, which in // turn is then used as a leaf within // the final median composite (together with a "normal leaf" i.e. DotSpatial implementation) var crsTransformationAdapterCompositeFactory = CrsTransformationAdapterCompositeFactory.Create(); var compositeAverage = crsTransformationAdapterCompositeFactory.CreateCrsTransformationAverage(); var compositeFirstSuccess = crsTransformationAdapterCompositeFactory.CreateCrsTransformationFirstSuccess(); var weightsForCompositeLeafs = new List <CrsTransformationAdapterWeight> { CrsTransformationAdapterWeightFactory.Create().CreateFromInstance( compositeAverage, 1.0 // weight ), CrsTransformationAdapterWeightFactory.Create().CreateFromInstance( compositeFirstSuccess, 2.0 // weight ) }; CrsTransformationAdapterComposite weightedCompositeAdapterWithOtherCompositesAsLeafs = crsTransformationAdapterCompositeFactory.CreateCrsTransformationWeightedAverage( weightsForCompositeLeafs ); var normalLeafDotSpatialAdapter = new CrsTransformationAdapterDotSpatial(); var adaptersForMedian = new List <ICrsTransformationAdapter> { weightedCompositeAdapterWithOtherCompositesAsLeafs, normalLeafDotSpatialAdapter }; var compositeMedian = crsTransformationAdapterCompositeFactory.CreateCrsTransformationMedian( adaptersForMedian ); // Now the "complex" composite (nested at two lelvels, with composites as leafs) // has been conctructed. // Now create a coordinate: var inputCoordinate = CrsCoordinateFactory.LatLon(60.0, 20.0); // Now use the above "complex" composite to transform the coordinate: var resultMedianWithNestedComposite = compositeMedian.Transform( inputCoordinate, EpsgNumber.SWEDEN__SWEREF99_TM__3006 ); Assert.IsTrue(resultMedianWithNestedComposite.isSuccess); var coordinateResultMedianWithNestedComposite = resultMedianWithNestedComposite.OutputCoordinate; // Now use some leaf (not using DotSpatial as above) // to also make the same Transform, to use it // in the result comparison var mightyLittleGeodesyAdapter = new CrsTransformationAdapterMightyLittleGeodesy(); var coordinateResultMightyLittleGeodesyAdapter = mightyLittleGeodesyAdapter.TransformToCoordinate( inputCoordinate, EpsgNumber.SWEDEN__SWEREF99_TM__3006 ); // The difference should not be very large, and the delta // value below is one decimeter const double deltaValueForAssertions = 0.1; Assert.AreEqual( coordinateResultMightyLittleGeodesyAdapter.X, coordinateResultMedianWithNestedComposite.X, deltaValueForAssertions ); Assert.AreEqual( coordinateResultMightyLittleGeodesyAdapter.Y, coordinateResultMedianWithNestedComposite.Y, deltaValueForAssertions ); var children = resultMedianWithNestedComposite.TransformationResultChildren; // one child is the weightedComposite and the other dotSpatial Assert.AreEqual(2, children.Count); // the assumed order in the two rows below is a little bit fragile CrsTransformationResult resultWeightedComposite = children[0]; CrsTransformationResult resultDotSpatial = children[1]; Assert.AreEqual(weightedCompositeAdapterWithOtherCompositesAsLeafs, resultWeightedComposite.CrsTransformationAdapterResultSource); Assert.AreEqual(normalLeafDotSpatialAdapter, resultDotSpatial.CrsTransformationAdapterResultSource); // the weighted composite has two children (average and firstSuccess) var childrenForWeightedComposite = resultWeightedComposite.TransformationResultChildren; Assert.AreEqual(2, childrenForWeightedComposite.Count); // the leaf should not have any child results Assert.AreEqual(0, resultDotSpatial.TransformationResultChildren.Count); // the assumed order in the two rows below is a little bit fragile CrsTransformationResult resultAverage = childrenForWeightedComposite[0]; CrsTransformationResult resultFirstSuccess = childrenForWeightedComposite[1]; // Average should use all normal leafs Assert.AreEqual(EXPECTED_NUMBER_OF_ADAPTER_LEAF_IMPLEMENTATIONS, resultAverage.TransformationResultChildren.Count); // First success should only have one child result i.e. the first should have succeeded Assert.AreEqual(1, resultFirstSuccess.TransformationResultChildren.Count); }
private void AssertCompositeNotNullAndAggregatesManyImplementations(CrsTransformationAdapterComposite crsTransformationAdapterComposite) { Assert.IsNotNull(crsTransformationAdapterComposite); IList<ICrsTransformationAdapter> list = crsTransformationAdapterComposite._GetCompositeStrategy()._GetAllTransformationAdaptersInTheOrderTheyShouldBeInvoked(); Assert.AreEqual(EXPECTED_NUMBER_OF_ADAPTER_LEAF_IMPLEMENTATIONS, list.Count); }
public void CreateCrsTransformationFirstSuccess_ShouldBeCreatedWithManyImplementations_WhenInstantiatingWithoutParameters() { CrsTransformationAdapterComposite crsTransformationFirstSuccess = crsTransformationAdapterCompositeFactory.CreateCrsTransformationFirstSuccess(); AssertCompositeNotNullAndAggregatesManyImplementations(crsTransformationFirstSuccess); }
public void FindPotentialBuggyImplementationsHelper( int minEpsgCrsCode, int maxEpsgCrsCode, double?optionalDelta = null ) { int numberIfEpsgCodesToConsiderInIteration = maxEpsgCrsCode - minEpsgCrsCode; bool manyWillBeIterated = numberIfEpsgCodesToConsiderInIteration > 100; double deltaDiffToUse = manyWillBeIterated ? deltaDiff : double.MinValue; if (optionalDelta.HasValue) { deltaDiffToUse = optionalDelta.Value; } var crsTransformationAdapterCompositeFactory = CrsTransformationAdapterCompositeFactory.Create(); CrsTransformationAdapterComposite crsTransformationComposite = crsTransformationAdapterCompositeFactory.CreateCrsTransformationMedian(); verifyThreeImplementations(crsTransformationComposite); // to make sure that the above factory really creates an object which will use three implementations IList <CrsTransformationResult> transformResultsWithLargeDifferences = new List <CrsTransformationResult>(); CrsIdentifier wgs84 = CrsIdentifierFactory.CreateFromEpsgNumber(EpsgNumber.WORLD__WGS_84__4326); var stopWatch = new Stopwatch(); stopWatch.Start(); IList <EpsgCrsAndAreaCodeWithCoordinates> coordinatesFromGeneratedCsvFile = CoordinateTestDataGeneratedFromEpsgDatabaseTest.GetCoordinatesFromGeneratedCsvFile(); int seconds = (int)stopWatch.Elapsed.TotalSeconds; WriteLine("Time for reading the content of the input file: " + seconds); stopWatch.Restart(); int totalNumberOfSeconds; WriteLine("number of rows to iterate: " + coordinatesFromGeneratedCsvFile.Count); for (int i = 0; i < coordinatesFromGeneratedCsvFile.Count; i++) { if (manyWillBeIterated && (i % 100 == 0)) { //WriteLine("number of rows iterated so far: " + i); totalNumberOfSeconds = (int)stopWatch.Elapsed.TotalSeconds; //WriteLine("Number of seconds so far: " + totalNumberOfSeconds); // if (i > 50) break; } EpsgCrsAndAreaCodeWithCoordinates epsgCrsAndAreaCodeWithCoordinates = coordinatesFromGeneratedCsvFile[i]; if ( epsgCrsAndAreaCodeWithCoordinates.epsgCrsCode < minEpsgCrsCode || epsgCrsAndAreaCodeWithCoordinates.epsgCrsCode > maxEpsgCrsCode ) { continue; } if (!manyWillBeIterated) { //Console.WriteLine("iterated epsgCrsCode: " + epsgCrsAndAreaCodeWithCoordinates.epsgCrsCode); } CrsCoordinate coordinateInputWgs84 = CrsCoordinateFactory.CreateFromYNorthingLatitudeAndXEastingLongitude(epsgCrsAndAreaCodeWithCoordinates.centroidY, epsgCrsAndAreaCodeWithCoordinates.centroidX, wgs84); CrsTransformationResult resultOutputFromWgs4 = crsTransformationComposite.Transform(coordinateInputWgs84, epsgCrsAndAreaCodeWithCoordinates.epsgCrsCode); if (!resultOutputFromWgs4.IsSuccess) { continue; } CrsTransformationResult resultWhenTransformedBackToWgs84 = crsTransformationComposite.Transform(resultOutputFromWgs4.OutputCoordinate, wgs84); if (!resultWhenTransformedBackToWgs84.IsSuccess) { continue; } CrsTransformationResultStatistic crsTransformationResultStatistic = resultWhenTransformedBackToWgs84.CrsTransformationResultStatistic; Assert.IsNotNull(crsTransformationResultStatistic); Assert.IsTrue(crsTransformationResultStatistic.IsStatisticsAvailable); if ( crsTransformationResultStatistic.MaxDifferenceForXEastingLongitude > deltaDiffToUse || crsTransformationResultStatistic.MaxDifferenceForYNorthingLatitude > deltaDiffToUse ) { transformResultsWithLargeDifferences.Add(resultWhenTransformedBackToWgs84); } else { if (!manyWillBeIterated) { //Console.WriteLine("NOT 'big' difference for EPSG " + epsgCrsAndAreaCodeWithCoordinates.epsgCrsCode); int count = crsTransformationComposite.TransformationAdapterChildren.Count; //Console.WriteLine("Number of implementations not having big difference: " + count); } } } WriteLine("Number of iterated rows/coordinates: " + coordinatesFromGeneratedCsvFile.Count); WriteLine("Number of results with 'large' differences: " + transformResultsWithLargeDifferences.Count); for (int i = 0; i < transformResultsWithLargeDifferences.Count; i++) { CrsTransformationResult transformResult = transformResultsWithLargeDifferences[i]; WriteLine("----------------------------------------"); WriteLine("epsg " + transformResult.InputCoordinate.CrsIdentifier.CrsCode); WriteLine("MaxDiffYLatitude : " + transformResult.CrsTransformationResultStatistic.MaxDifferenceForYNorthingLatitude); WriteLine("MaxDiffYLongitude: " + transformResult.CrsTransformationResultStatistic.MaxDifferenceForXEastingLongitude); IList <CrsTransformationResult> subResults = transformResult.TransformationResultChildren; for (int j = 0; j < subResults.Count; j++) { CrsTransformationResult subTransformResult = subResults[j]; if (subTransformResult.IsSuccess) { WriteLine(subTransformResult.OutputCoordinate + " , " + subTransformResult.CrsTransformationAdapterResultSource.AdapteeType); } } } }