/// <summary> /// 判断闪电的强度是否在section范围内,强度取绝对值。 /// </summary> /// <param name="_strike"></param> /// <param name="_section"></param> /// <returns></returns> private bool WhetherStrikeInSection(BaseStrikeStandard _strike, Section _section) { bool result = false; double intensity = Math.Abs(_strike.Intensity); if (intensity >= _section.minValue && intensity < _section.maxValue) { result = true; } return(result); }
/// <summary> /// 判断闪电是否在形状集内部 /// </summary> /// <param name="_srcStrike"></param> /// <returns></returns> public bool AddStrikeToShapesWithJudgment(BaseStrikeStandard _srcStrike) { foreach (var tmpShape in shapesCore) { bool srcStrikeInTmpShape = tmpShape.AddStrikeToShapeWithJudgment(_srcStrike); if (srcStrikeInTmpShape) { return(true); // 当前闪电落在任何一个矩形集合中,返回true; 并且不要继续执行; } } return(false); }
public BaseStrikeBasic ConvertStandardStrikToBasic(BaseStrikeStandard strike) { var res = new LightningStrikeBasic() { ID = strike.ID, DateAndTime = strike.DateAndTime, Longitude = strike.Longitude, Latitude = strike.Latitude }; return(res); }
public BaseStrikeChina ConvertStandardStrikToChina(BaseStrikeStandard strike) { var res = new LightningStrikeChina() { 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 void ProcessStrikes(BaseStrikeStandard strike);
public override void ProcessStrikes(BaseStrikeStandard strike) { shapes.AddStrikeToShapesWithJudgment(strike); }