Пример #1
0
        private static IPolyline VerifyZOnlyDifferences(IPolyline sourcePolyline,
                                                        IPolyline targetPolyline,
                                                        int expectedResultLength,
                                                        double zTolerance = 0)
        {
            IPolyline geomOpResult = IntersectionUtils.GetZOnlyDifferenceLines(
                sourcePolyline, targetPolyline, zTolerance);

            Assert.IsNotNull(geomOpResult);
            Assert.AreEqual(expectedResultLength, Math.Round(geomOpResult.Length, 3));

            IPolyline legacyResult =
                ReshapeUtils.GetZOnlyDifferenceLegacy(sourcePolyline,
                                                      targetPolyline, zTolerance);

            Assert.IsNotNull(legacyResult);

            Assert.AreEqual(expectedResultLength, Math.Round(legacyResult.Length, 3));

            GeometryUtils.AreEqual(geomOpResult, legacyResult);

            return(geomOpResult);
        }