public BaseStrikeStandard ConvertBasicStrikToStandard(BaseStrikeBasic strike)
        {
            var res = new LightningStrikeStandard()
            {
                ID          = strike.ID,
                DateAndTime = strike.DateAndTime,
                Longitude   = strike.Longitude,
                Latitude    = strike.Latitude
            };

            return(res);
        }
        //public double Longitude { get; set; }
        //public double Latitude { get; set; }
        //public LightningType LightningType { get; set; }
        //public DateTime DateTime { get; set; }

        //应该把所有的转换放在服务层,然后通过Interface注入的方式来实现; 1 集中化管理; 2 方便维护;
        public override BaseStrikeStandard ConvertToIStrike_Standard()
        {
            var strike = new LightningStrikeStandard()
            {
                ID            = this.ID,
                DateAndTime   = this.DateAndTime,
                Longitude     = this.Longitude,
                Latitude      = this.Latitude,
                LightningType = this.LightningType
            };

            return(strike);
        }
 /// <summary>
 /// 输入一个闪电,判断其对应中心点经纬度 方向|| Get direction of a strike
 /// </summary>
 /// <param name="_strike"></param>
 /// <returns></returns>
 private LightningStrikeDirectionEnum JudgeLightningStrikeDirection(LightningStrikeStandard _strike, PointLocation _centerPoint)
 {
     try
     {
         LightningStrikeDirectionEnum result = new LightningStrikeDirectionEnum();
         double angle = AngleClass.CalcueAngle(_centerPoint.Longitude, _centerPoint.Latitude, _strike.Longitude, _strike.Latitude);
         result = AngleClass.GetLightningStrikeDirection(angle);
         return(result);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 public override bool AddStrikeToShapeWithJudgment(LightningStrikeStandard strike)
 {
     try
     {
         bool strikeInShape = JudgePointInRange(strike.Longitude, strike.Latitude);
         if (strikeInShape)
         {
             strikes_Standard.Strikes.Add(strike);
         }
         return(strikeInShape);
     }
     catch
     {
         throw new NotImplementedException();
     }
 }
        public BaseStrikeStandard ConvertChineseStrikToStandard(BaseStrikeChina strike)
        {
            var res = new LightningStrikeStandard()
            {
                ID            = strike.ID,
                DateAndTime   = strike.DateAndTime,
                Longitude     = strike.Longitude,
                Latitude      = strike.Latitude,
                Intensity     = strike.Intensity,
                Slope         = strike.Slope,
                Error         = strike.Error,
                LocationMode  = strike.LocationMode,
                LightningType = strike.LightningType
            };

            return(res);
        }
 public abstract bool AddStrikeToShapeWithJudgment(LightningStrikeStandard _strike);