コード例 #1
0
 public void ValidateNoFullGlobe()
 {
     GeometryPipeline v = new SpatialValidatorImplementation();
     var ex = SpatialTestUtils.RunCatching<FormatException>(() => v.BeginGeometry(SpatialType.FullGlobe));
     Assert.IsNotNull(ex);
     Assert.AreEqual(Strings.Validator_InvalidType(SpatialType.FullGlobe), ex.Message);
 }
コード例 #2
0
 public void ValidatePolygonRing()
 {
     GeometryPipeline v = new SpatialValidatorImplementation();
     v.SetCoordinateSystem(NonDefaultGeometricCoords);
     v.BeginGeometry(SpatialType.Polygon);
     v.BeginFigure(new GeometryPosition(10, 20, 30, 40));
     v.LineTo(new GeometryPosition(20, 30, 40, 50));
     v.LineTo(new GeometryPosition(20, 40, 40, 50));
     v.LineTo(new GeometryPosition(10, 20, 30, 40));
     v.EndFigure();
     v.EndGeometry();
 }
コード例 #3
0
 public void ValidatePolygonRing_LessThanFour()
 {
     GeometryPipeline v = new SpatialValidatorImplementation();
     v.SetCoordinateSystem(NonDefaultGeometricCoords);
     v.BeginGeometry(SpatialType.Polygon);
     v.BeginFigure(new GeometryPosition(10, 20, 30, 40));
     v.LineTo(new GeometryPosition(20, 30, 40, 50));
     v.LineTo(new GeometryPosition(20, 30, 40, 50));
     var ex = SpatialTestUtils.RunCatching<FormatException>(v.EndFigure);
     Assert.IsNotNull(ex);
     Assert.AreEqual(Strings.Validator_InvalidPolygonPoints, ex.Message);
 }
コード例 #4
0
        public void ValidateFullGlobe_Geometry()
        {
            GeometryPipeline v = new SpatialValidatorImplementation();
            v.SetCoordinateSystem(NonDefaultGeometricCoords);

            var ex = SpatialTestUtils.RunCatching<FormatException>(() => v.BeginGeometry(SpatialType.FullGlobe));
            Assert.NotNull(ex);
            Assert.Equal(Strings.Validator_InvalidType(SpatialType.FullGlobe), ex.Message);
        }