示例#1
0
文件: GridSetTests.cs 项目: jbrwn/tc
        public void CoordToEnvelope_SimpleGridsetTopOrgin_ReturnsEnvelope()
        {
            GridSet g = new GridSet(
                "test",
                "epsg:test",
                new Envelope(0, 0, 100, 100),
                new List<double>() { 10, 5, 2.5 },
                10,
                10
            );

            Envelope expected = new Envelope(0, 0, 100, 100);
            Assert.IsTrue(expected.Equals(g.CoordToEnvelope(new Coord(0, 0, 0, true))));

            expected = new Envelope(0, 0, 50, 50);
            Assert.IsTrue(expected.Equals(g.CoordToEnvelope(new Coord(1, 0, 1, true))));

            expected = new Envelope(75, 75, 100, 100);
            Assert.IsTrue(expected.Equals(g.CoordToEnvelope(new Coord(2, 3, 0, true))));
        }
示例#2
0
文件: GridSetTests.cs 项目: jbrwn/tc
        public void CoordToEnvelope_InvalidZ_throws()
        {
            GridSet g = new GridSet(
                "test",
                "epsg:test",
                new Envelope(0, 0, 100, 100),
                new List<double>() { 10, 5, 2.5 },
                10,
                10
            );

            g.CoordToEnvelope(new Coord(3, 0, 0));
        }