Example #1
0
        /// <summary>
        /// 获取后缀名称
        /// </summary>
        /// <param name="type"></param>
        /// <param name="time"></param>
        /// <returns></returns>
        public static string GetFileExtension(IgsProductType type, Time time)
        {
            var fileNameZipModel = Gnsser.Data.IgsProductFileNameModel.Instance.GetExtensionModel(type);
            TimeBasedFilePathBuilder FilePathBuilder = new  TimeBasedFilePathBuilder(fileNameZipModel);
            var models = FilePathBuilder.Get(time);

            Dictionary <string, string> dic = new Dictionary <string, string>();

            dic.Add(ELMarker.ProductType, type.ToString());
            ELMarkerReplaceService service = new ELMarkerReplaceService(dic);
            var extensoin = service.Get(models.FilePath);

            return(extensoin);
        }
Example #2
0
        //  string path = "E:\\Code\\Gnsser2015.02.01-CuiY\\Gnsser\\Gnsser.Winform\\bin\\Debug\\Data\\GNSS\\Common\\2013001.vmf1_g";

        /// <summary>
        /// 获取
        /// </summary>
        /// <param name="stationName"></param>
        /// <returns></returns>
        public List <Vmf1Value> Get(string stationName, Time date)
        {
            //按周存放
            if (!Contains(stationName))
            {
                TimeBasedFilePathBuilder builder = new TimeBasedFilePathBuilder(this.Option.FilePath);
                var path = builder.Get(date);
                if (File.Exists(path.FilePath))
                {
                    this.Vmf1Value = new Vmf1FileReader(path.FilePath).Read().GetStaInfo(stationName);
                    Set(stationName, Vmf1Value);
                }
                else
                {
                    //采用null,进行标记
                    Geo.IO.Log.GetLog(this).Error("没有Vmf1文件,请下载到," + path.FilePath);
                    Set(stationName, null);
                }
            }

            this.Vmf1Value = Get(stationName);
            if (this.Vmf1Value == null)
            {
                return(new List <Vmf1Value>());
            }

            return(this.Vmf1Value);


            //Vmf1File  vmf1file = null;

            //string keyPrev = "VMF1" + stationName;

            //vmf1file = new Vmf1FileReader(path).Read();

            //satData[keyPrev] = vmf1file;

            //return vmf1file.GetStaInfo(stationName);
        }