Beispiel #1
0
        public static IGeoImage GeoOpen(string path)
        {
            if (string.IsNullOrEmpty(path))
            {
                return(null);
            }

            if (System.IO.Path.GetExtension(path) == ".rst")
            {
                try
                {
                    GeoImage img = new GeoImage(path);
                    img.Tag = path;
                    return(img);
                }
                catch
                {
                    return(null);
                }
            }
            else
            {
                GeoNormalImage img = new GeoNormalImage();
                if ("" != img.Open(path))
                {
                    img.Dispose();
                    return(null);
                }
                img.Tag = path;
                return(img);
            }
        }