Example #1
0
        public void Tile_0_0_0_Returns_Entire_World()
        {
            ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Server);

            IEnvelope e = TileUtil.GetEnvelopeFromZoomRowCol(0, 0, 0);

            Assert.AreEqual(e.XMax, 180);
            Assert.AreEqual(e.XMin, -180);
            Assert.AreApproximatelyEqual(e.YMax, 85.0511, 0.001);
            Assert.AreApproximatelyEqual(e.YMin, -85.0511, 0.001);
        }
Example #2
0
        public void Tile_13_3083_1702()
        {
            ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Server);

            IPoint p1 = TileUtil.TileToGeographic(1702, 3083, 13);
            IPoint p2 = TileUtil.TileToGeographic(1703, 3084, 13);


            IEnvelope e = TileUtil.GetEnvelopeFromZoomRowCol(13, 1702, 3083);

            Assert.AreApproximatelyEqual(e.UpperLeft.X, p1.X, 0.001);
            Assert.AreApproximatelyEqual(e.LowerRight.X, p2.X, 0.001);
            Assert.AreApproximatelyEqual(e.UpperLeft.Y, p1.Y, 0.001);
            Assert.AreApproximatelyEqual(e.LowerRight.Y, p2.Y, 0.001);
        }