Ejemplo n.º 1
0
        private void _SetOverviewSameLevel(ref int nLevel)
        {
            nLevel = ImageCalculus.GetTotalLevelForPyramid(_sizeTile, _ds.RasterXSize, _ds.RasterYSize);
            if (_ds.GetRasterBand(1).GetOverviewCount() < 1)
            {
                int[] aryOverview = new int[nLevel];
                for (int i = 0; i < nLevel; i++)
                {
                    aryOverview[i] = (int)Math.Pow(2.0, (double)(i + 1));
                }

                // Example:
                // Level = 3
                // aryOverview = { 2, 4, 8 }

                _ds.BuildOverviews("NEAREST", aryOverview);
            }
            else
            if (_ds.GetRasterBand(1).GetOverviewCount() != nLevel)
            {
                string sMsg = string.Format(
                    "{0}/{1}: Number overview({2}) in image is different for Level({3})",
                    this.ToString(), "_SetOverviewSameLevel", _ds.GetRasterBand(1).GetOverviewCount(), nLevel);

                throw (new Exception(sMsg));
            }
        }
Ejemplo n.º 2
0
        public void Write()
        {
            int Level = ImageCalculus.GetTotalLevelForPyramid(_sizeTile, _ds.RasterXSize, _ds.RasterYSize);

            _SetLstKMLTile(Level);

            KMLWriteTilesMng kmlMng = new KMLWriteTilesMng(_path, _lstKMLTile);

            double[] boxImg = new double[4];
            _WriteBox(ref boxImg);

            kmlMng.WriteMain(_nameFile, boxImg);
            kmlMng.WriteTiles(Level);
        }