Ejemplo n.º 1
0
        public GidManager(string path)
        {
            LineFileReader <GidItem> r = new LineFileReader <GidItem>(path);
            var list = r.ReadAll();

            foreach (var item in list)
            {
                this[item.FileId] = item.DbId;
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 读取文件ID和数据库ID。比如平差之星的Pname文件。
        /// </summary>
        /// <param name="path"></param>
        /// <returns></returns>
        public static GidManager ReadFileIdDbId(string path)
        {
            Geo.IO.Gmetadata nameData = Geo.IO.Gmetadata.NewInstance;
            nameData.PropertyNames = new string[] { "FileId", "DbId" };
            nameData.ItemSplliter  = new string[] { " ", "\t" };

            GidManager GidManager      = new Data.GidManager();
            LineFileReader <GidItem> r = new LineFileReader <GidItem>(path, nameData);
            var list = r.ReadAll();

            foreach (var item in list)
            {
                GidManager[item.FileId] = item.DbId;
            }
            return(GidManager);
        }