private void CheckRounding(string wkt, double scale, string expectedWKT)
        {
            var geom   = Read(wkt);
            var pm     = new PrecisionModel(scale);
            var noder  = GetSnapRounder(pm);
            var result = NodingTestUtility.NodeValidated(geom, null, noder);

            // only check if expected was provided
            if (expectedWKT == null)
            {
                return;
            }

            var expected = Read(expectedWKT);

            CheckEqual(expected, result);
        }
示例#2
0
        void CheckRounding(string wkt1, string wkt2, double snapDist, string expectedWKT)
        {
            var      geom1 = Read(wkt1);
            Geometry geom2 = null;

            if (wkt2 != null)
            {
                geom2 = Read(wkt2);
            }

            var noder  = new SnappingNoder(snapDist);
            var result = NodingTestUtility.NodeValidated(geom1, geom2, noder);

            // only check if expected was provided
            if (expectedWKT == null)
            {
                return;
            }
            var expected = Read(expectedWKT);

            CheckEqual(expected, result);
        }