public static Tile GetNewTile(Imageset imageset, int level, int x, int y, Tile parent)
        {
            switch (imageset.Projection)
            {
            case ProjectionType.Mercator:
            {
                MercatorTile newTile = MercatorTile.Create(level, x, y, imageset, parent);
                return(newTile);
            }

            case ProjectionType.Equirectangular:
            {
                return(EquirectangularTile.Create(level, x, y, imageset, parent));
            }

            //case ProjectionType.Spherical:
            //    {
            //        return new SphericalTile(level, x, y, imageset, parent);
            //    }
            default:
            case ProjectionType.Toast:
            {
                return(ToastTile.Create(level, x, y, imageset, parent));
            }

            case ProjectionType.SkyImage:
            {
                return(new SkyImageTile(level, x, y, imageset, parent));
            }

            case ProjectionType.Plotted:
            {
                return(PlotTile.Create(level, x, y, imageset, parent));
            }

            case ProjectionType.Healpix:
            {
                if (imageset.HipsProperties == null)
                {
                    imageset.HipsProperties = new HipsProperties(imageset);
                }
                if (imageset.HipsProperties.DownloadComplete)
                {
                    return(new HealpixTile(level, x, y, imageset, parent));
                }
                else
                {
                    return(null);
                }
            }

            case ProjectionType.Tangent:
            {
                TangentTile newTile = new TangentTile(level, x, y, imageset, parent);
                return(newTile);
            }
            }
        }
 public static EquirectangularTile Create(int level, int x, int y, Imageset dataset, Tile parent)
 {
     EquirectangularTile temp = new EquirectangularTile();
     temp.Parent = parent;
     temp.Level = level;
     temp.tileX = x;
     temp.tileY = y;
     temp.dataset = dataset;
     temp.topDown = !dataset.BottomsUp;
     temp.ComputeBoundingSphere();
     return temp;
 }
        public static EquirectangularTile Create(int level, int x, int y, Imageset dataset, Tile parent)
        {
            EquirectangularTile temp = new EquirectangularTile();

            temp.Parent  = parent;
            temp.Level   = level;
            temp.tileX   = x;
            temp.tileY   = y;
            temp.dataset = dataset;
            temp.topDown = !dataset.BottomsUp;
            temp.ComputeBoundingSphere();
            return(temp);
        }
示例#4
0
        public static Tile GetNewTile(Imageset imageset, int level, int x, int y, Tile parent)
        {
            switch (imageset.Projection)
            {
            case ProjectionType.Mercator:
            {
                MercatorTile newTile = MercatorTile.Create(level, x, y, imageset, parent);
                return(newTile);
            }

            case ProjectionType.Equirectangular:
            {
                return(EquirectangularTile.Create(level, x, y, imageset, parent));
            }

            //case ProjectionType.Spherical:
            //    {
            //        return new SphericalTile(level, x, y, imageset, parent);
            //    }
            default:
            case ProjectionType.Toast:
            {
                return(ToastTile.Create(level, x, y, imageset, parent));
            }

            case ProjectionType.SkyImage:
            {
                return(SkyImageTile.Create(level, x, y, imageset, parent));
            }

            case ProjectionType.Plotted:
            {
                return(PlotTile.Create(level, x, y, imageset, parent));
            }

            case ProjectionType.Healpix:
            {
                return(new HealpixTile(level, x, y, imageset, parent));
            }

            case ProjectionType.Tangent:
            {
                TangentTile newTile = TangentTile.Create(level, x, y, imageset, parent);
                return(newTile);
            }
            }
        }