コード例 #1
0
        public void TestWriteProjectedCoordinateSystem()
        {
            IProjectedCoordinateSystem ProjectedCoordinateSystem = _factory.CreateProjectedCoordinateSystem("27700");
            TextWriter         textwriter         = new StringWriter();
            IndentedTextWriter indentedTextWriter = new IndentedTextWriter(textwriter);

            CoordinateSystemWktWriter.Write(ProjectedCoordinateSystem, indentedTextWriter);
            bool same = Compare.CompareAgainstString(Global.GetUnitTestRootDirectory() + @"\IO\ProjectedCoordinateSystem.txt", textwriter.ToString());

            Assertion.AssertEquals("test 1", true, same);
        }
コード例 #2
0
        public void TestCreateProjectedCoordinateSystem1()
        {
            try
            {
                _factory.CreateProjectedCoordinateSystem(null);
                Assertion.Fail("Should not allow a null parameter");
            }
            catch (ArgumentNullException)
            {
            }

            // 4141 is a geographic 2d CRS Kind and thus should not work when trying to create a projected coordinate system.
            try
            {
                _factory.CreateProjectedCoordinateSystem("-1");
                Assertion.Fail("Should not allow a null parameter");
            }
            catch (ArgumentException)
            {
            }
        }
コード例 #3
0
        public void Test_Constructor1()
        {
            ICoordinateSystem        headCRS    = _factory.CreateProjectedCoordinateSystem("27700");
            ICoordinateSystem        tailCRS    = _factory.CreateVerticalCoordinateSystem("5701");
            CompoundCoordinateSystem compoundCS = new CompoundCoordinateSystem(headCRS,
                                                                               tailCRS,
                                                                               "remarks",
                                                                               "authority",
                                                                               "code",
                                                                               "name",
                                                                               "alias",
                                                                               "abbreviation");

            Assertion.AssertEquals("ctor1.", headCRS, compoundCS.HeadCS);
            Assertion.AssertEquals("ctor2.", tailCRS, compoundCS.TailCS);
            Assertion.AssertEquals("ctor3.", "remarks", compoundCS.Remarks);
            Assertion.AssertEquals("ctor3.", "authority", compoundCS.Authority);
            Assertion.AssertEquals("ctor3.", "code", compoundCS.AuthorityCode);
            Assertion.AssertEquals("ctor3.", "name", compoundCS.Name);
            Assertion.AssertEquals("ctor3.", "alias", compoundCS.Alias);
            Assertion.AssertEquals("ctor3.", "abbreviation", compoundCS.Abbreviation);
        }
コード例 #4
0
 public void TestProjectedCoordinateSystem()
 {
     IProjectedCoordinateSystem projectedCoordinateSystem = _factory.CreateProjectedCoordinateSystem("27700");
     string test1 = CoordinateSystemXmlWriter.Write(projectedCoordinateSystem);
 }