/// <summary> /// 计算backhaul链路的路损 /// </summary> /// <param name="lteCell"></param> /// <param name="relayCell"></param> /// <returns></returns> public Dictionary<int, List<float>> CaclBackhaulPathLoss(LTECell lteCell, RelayCell relayCell) { //一个lteCell有两根天线,每根天线存一个路损值和天线值 float calcResolution = 0; SetCellResolution(lteCell, ref calcResolution); PathLossCalcParam[] cellCalcPara = m_CalcParamFactory.GetCellCalcPara(lteCell, calcResolution); Dictionary<int, List<float>> antennaPathLoss = new Dictionary<int, List<float>>(); for (int i = 0; i < cellCalcPara.Length; i++) { float pathLoss = 0; float antGain = 0; SectionPathLossCalcParam sectionParam = cellCalcPara[i].SectionParamArray[0]; IPathLossCalculator calcMethod = GetCalcMethod(sectionParam); if (calcMethod != null) { GeoXYLine geoXYLine = new GeoXYLine(); Dictionary<string, object> modelDetailDictionary = new Dictionary<string, object>(); pathLoss = calcMethod.CalculatePointPathLoss(sectionParam, geoXYLine, out modelDetailDictionary); } antGain = CalcAntGain(lteCell, relayCell); List<float> list = new List<float>(); list.Add(pathLoss); list.Add(antGain); antennaPathLoss.Add(cellCalcPara[i].AntennaConfig.AntennaID, list); } return antennaPathLoss; }
private float[] CalcPointPathLoss(SectionPathLossCalcParam param, GeoXYLine xyLine, float UlFrequency, out Dictionary<string, object> modelDetail) { IPathLossCalculator calcMethod = this.GetCalcMethod(param); float num = calcMethod.CalculatePointPathLoss(param, xyLine, out modelDetail); float num2 = num + calcMethod.CalcDeltaLossFrmDLToUL(param.PropagModel, param.Frequency, UlFrequency, param.RxAntennaHeight); return new float[] { num2, num }; }
private static void UpdateNearestCell(ISimUser user, ref ISimCellBase nearestCell, ref float minDistance, ISimCellBase cellBase) { GeoXYPoint trancXY = new GeoXYPoint(cellBase.X, cellBase.Y); GeoXYPoint userXY = new GeoXYPoint(user.X, user.Y); GeoXYLine trancToUser = new GeoXYLine(trancXY, userXY); FindNearestCell(ref nearestCell, ref minDistance, cellBase, trancToUser); }
private void CalcVectorMultiple(ref double d1, ref double d2, ref double d3, ref double d4, GeoXYLine line) { d1 = this.VectorMultiple(this.m_Points[0], this.m_Points[1], line.Points[0]); d2 = this.VectorMultiple(this.m_Points[0], this.m_Points[1], line.Points[1]); d3 = this.VectorMultiple(line.Points[0], line.Points[1], this.m_Points[0]); d4 = this.VectorMultiple(line.Points[0], line.Points[1], this.m_Points[1]); }
private GraphicsPath BuildLinePath(GeoXYLine line, GeoLineStyle lineStyle, Rectangle FormRectangle) { GraphicsPath path = new GraphicsPath(); Point[] pts = this.FilterToPointArray(this.GetScreenPoints(line, new Point()).ToArray()); Point[] points = null; if ((pts.Length <= 2) || this.IsAllPointsInRect(pts, FormRectangle)) { points = pts; } else { Point[] pointArray = new Point[] { FormRectangle.Location, new Point(FormRectangle.Right, FormRectangle.Top), new Point(FormRectangle.Right, FormRectangle.Bottom), new Point(FormRectangle.Left, FormRectangle.Bottom) }; Polygon polygon = this.BuildGpcPolygonFromPointArray(pointArray); if (pts.Length > 2) { Polygon polygon2 = this.BuildGpcPolygonFromPointArray(pts); points = GpcWrapper.Clip(GpcOperation.Intersection, polygon, polygon2).ToPointArray(); } } if (points.Length > 1) { path.AddLines(points); this.m_WidenPen.Width = lineStyle.LineWidth + 6f; path.Widen(this.m_WidenPen); } return path; }
//这个方法好像没有调用的地方 public float[] CalcPointPathLoss(IPropagationModel prop, IACell carrier, AntConfig ant, GeoXYLine xyLine, float resolution, float rxHeight, out Dictionary<string, object> modelDetail) { if (prop == null) { modelDetail = null; return new float[2]; } AntConfig config = ant; IPropagationModel model = prop; SectionPathLossCalcParam param = new SectionPathLossCalcParam(); param.TxAntennaHeight = config.Height; if (!(AntConfig.IS_ANTENNA_HEIGHT_INCLUDE_BUILDING || !this.GeoDataProvider.IGeoProvider.IsBuildingLoaded)) { param.TxAntennaHeight += this.GeoDataProvider.GisInfo.GetValueByGeoXYPoint(xyLine.Points[0], DemDataType.Building, false); } param.RxAntennaHeight = rxHeight; param.Frequency = carrier.FreqBand.DLFrequency; param.MergeEdgeMaxDis = 80f; param.PropagModel = model; param.CalcResolution = resolution; param.CalcEndRadius = (float) xyLine.GetDistance(); param.X = (float) xyLine.Points[0].X; param.Y = (float) xyLine.Points[0].Y; return this.CalcPointPathLoss(param, xyLine, carrier.FreqBand.ULFrequency, out modelDetail); }
public override float CalculatePointPathLoss(SectionPathLossCalcParam param, GeoXYLine xyLine, out Dictionary<string, object> modelDetail) { base.CalculatePointPathLoss(param, xyLine, out modelDetail); RelayUEPropagationModel propModel = param.PropagModel as RelayUEPropagationModel; float distance= (float)(xyLine.GetDistance() / 1000); float prob=CalcProbability(propModel,distance); return GetPathLoss(propModel, distance, prob); }
private static void FindNearestCell(ref ISimCellBase nearestCell, ref float minDistance, ISimCellBase cellBase, GeoXYLine trancToUser) { float distance = (float)trancToUser.GetDistance(); if (distance < minDistance && distance < GetCalcRadius(cellBase)) { minDistance = distance; nearestCell = cellBase; } }
public override float CalculatePointPathLoss(SectionPathLossCalcParam param, GeoXYLine xyLine, out Dictionary<string, object> modelDetail) { float num = 0f; modelDetail = null; ITURPPropagationModel iTURPModel = param.PropagModel as ITURPPropagationModel; float num2 = (float) Math.Log10((double) param.Frequency); float num3 = (float) Math.Log10(xyLine.GetDistance()); num = ((iTURPModel.K2 + (iTURPModel.K1 * num2)) + (iTURPModel.N * num3)) + this.GetLf(iTURPModel); float num4 = 0f; return (num + (num4 * iTURPModel.KDiffraction)); }
public override float CalculatePointPathLoss(SectionPathLossCalcParam param, GeoXYLine xyLine, out Dictionary<string, object> modelDetail) { float num = 0f; modelDetail = null; KeenanMotleyPropagationModel model = param.PropagModel as KeenanMotleyPropagationModel; float num2 = (float) Math.Log10((double) param.Frequency); float num3 = (float) Math.Log10(xyLine.GetDistance() / 1000); num = ((model.K1 + (model.K2 * num2)) + (model.K3 * num3)) + (model.K4 * model.K5); float num4 = 0f; return (num + (num4 * model.KDiffraction)); }
private float CalcEffecTxHt(CellInformation cellInfo, BinInformation binInfo) { GeoXYLine geoXYLine = new GeoXYLine(cellInfo.XYPoint, binInfo.XYPoint); short[] altitudes = base.m_GeoDataObserver.GisInfo.GetValueByGeoXYLine(geoXYLine, (double) cellInfo.Resolution, DemDataType.Height); this.m_EffTxHeightMethod = base.modelBeforeAdjust.EffTxHeightCalcuMethod as EffectTxHeightBase; SectionPathLossCalcParam param = new SectionPathLossCalcParam(); param.CalcResolution = cellInfo.Resolution; param.TxAntennaHeight = cellInfo.TxHeight; param.RxAntennaHeight = 1.5f; param.MergeEdgeMaxDis = 80f; param.PropagModel = base.modelBeforeAdjust; param.Frequency = cellInfo.Frequency; param.TransmitterName = cellInfo.CellName; float num = (this.m_EffTxHeightMethod == null) ? cellInfo.TxHeight : this.m_EffTxHeightMethod.CalcPointEffTxHt(param, altitudes); return (float) Math.Log10((double) num); }
public GisTrafficToPolygonCreater(GeoXYLine sourceLine, GeoUserVectorData userVectorData, double stripWidth) { this.m_SourceLine = sourceLine; this.m_PolyRegionExe = new PolyRegionExe(GeoNameControl.Instance); this.m_WidthOfStrip = stripWidth; this.m_XPositiveList = new List<GeoXYPoint>(); this.m_XOppositeList = new List<GeoXYPoint>(); this.m_PolyList = new List<GeoPolygon>(); this.m_GisLinePairList = new List<GisLinePair>(); this.m_PolyRegionDict = new Dictionary<int, GeoPolygonRegion>(); this.m_BaseData = userVectorData; List<GeoPolygonRegion> allPolygons = this.m_BaseData.GetAllPolygons(); foreach (GeoPolygonRegion region in allPolygons) { if (!this.m_PolyRegionDict.ContainsKey(region.ID)) { this.m_PolyRegionDict.Add(region.ID, region); } } GeoNameControl.Instance.PolygonRegionDict = this.m_PolyRegionDict; }
private void AddVectorLines(StreamReader sr, List<GeoDisplayLine> tmpLines, string[] delimiter) { while (!sr.EndOfStream) { GeoXYLine line = new GeoXYLine(); List<GeoXYPoint> geoPointFs = new List<GeoXYPoint>(); string curLine = sr.ReadLine(); int tmpPointsCount = this.CalcPoints(curLine); this.ReadXYPoints(tmpPointsCount, sr, delimiter, geoPointFs); line.Points = geoPointFs; if (line.PointsCount > 1) { GeoDisplayLine item = new GeoDisplayLine(line, this.m_DefaultLineStyle); item.AddFeature("PlanetVectorLineType", this.m_VectorType); tmpLines.Add(item); GeoXYRect miniEnclosingRect = line.GetMiniEnclosingRect(); this.m_VectorBound.Left = Math.Min(this.m_VectorBound.Left, miniEnclosingRect.Left); this.m_VectorBound.Right = Math.Max(this.m_VectorBound.Right, miniEnclosingRect.Right); this.m_VectorBound.Top = Math.Max(this.m_VectorBound.Top, miniEnclosingRect.Top); this.m_VectorBound.Bottom = Math.Min(this.m_VectorBound.Bottom, miniEnclosingRect.Bottom); } } }
private GeoDisplayLine(SerializationInfo info, StreamingContext context) { if (ProjectSingleton.Instance.OpenV3R5ProjectFile) { base.m_Comments = info.GetString("m_Remark"); List<GeoPolygon> list = info.GetValue("m_GeoPolygonList", typeof(List<GeoPolygon>)) as List<GeoPolygon>; List<GeoXYPoint> points = list[0].Points; this.m_Line = new GeoXYLine(points); this.m_Line.ID = info.GetInt32("m_ID"); this.m_Line.Name = info.GetString("m_Name"); GeoLineStyle style = GeoEntityStyleFactory.GenerateDefaultLineStyle(); style.Visible = info.GetBoolean("m_Visible"); style.LineWidth = info.GetSingle("m_LineWidth"); style.LineDashStyle = (DashStyle) info.GetValue("m_LineType", typeof(DashStyle)); style.Color = (Color) info.GetValue("m_LineColor", typeof(Color)); style.IsShowLabel = info.GetBoolean("m_IsShownPolygonName"); base.m_Style = style; } else { base.BuildBaseClassFromV3R6(info, context); this.m_Line = info.GetValue("m_Line", typeof(GeoXYLine)) as GeoXYLine; } }
public Feature GetFeatureByLine(GeoXYLine line, string featureName) { throw new NotImplementedException(); }
public GeoDisplayLine(GeoXYLine line, GeoLineStyle style) { this.m_Line = line; base.m_Style = style; base.AddFeature("VectorStyle", style); }
public GeoDisplayLine(GeoXYLine line) : this(line, GeoEntityStyleFactory.GenerateDefaultLineStyle()) { this.m_Line = line; }
public List<GeoXYPoint> GetClutterPointDict(GeoXYLine geoXYLine, short clutterID, List<int> clutterIDIndexList) { throw new NotImplementedException(); }
public short[] GetValueByGeoXYLine(GeoXYLine geoXYLine, double precision, DemDataType demDataType) { throw new NotImplementedException(); }
private static void GetXYOffset(GeoXYLine tempGeoXYLine, double precision, ref double xOffSetValue, ref double yOffSetValue) { double a = 0.0; a = tempGeoXYLine.GetAzimuthofLine(); xOffSetValue = Math.Abs((double) (precision * Math.Sin(a))); yOffSetValue = Math.Abs((double) (precision * Math.Cos(a))); }
public Dictionary<short, int> GetClutterCountDict(GeoXYLine geoXYLine) { throw new NotImplementedException(); }
public short[] GetValueByGeoXYLine(GeoXYLine geoXYLine, double precision, bool isDivInsert) { if (geoXYLine.PointsCount < 2) { return null; } List<short> list = new List<short>(); for (int i = 0; i < (geoXYLine.PointsCount - 1); i++) { List<GeoXYPoint> pointInGeoXYLine = new List<GeoXYPoint>(); short[] collection = this.GetValueByGeoXYLine(pointInGeoXYLine, geoXYLine.Points[i], geoXYLine.Points[i + 1], precision, isDivInsert); if (collection != null) { list.AddRange(collection); } } return list.ToArray(); }
public short[] GetValueByGeoXYLine(List<GeoXYPoint> pointInGeoXYLine, GeoXYPoint geoXYPointStart, GeoXYPoint geoXYPointEnd, double precision, bool isDivInsert) { GeoXYLine line = new GeoXYLine(geoXYPointStart, geoXYPointEnd); double distance = line.GetDistance(); int num2 = ((int) Math.Ceiling((double) (distance / precision))) + 1; int num3 = (geoXYPointEnd.X > geoXYPointStart.X) ? 1 : -1; int num4 = (geoXYPointEnd.Y > geoXYPointStart.Y) ? 1 : -1; double num5 = distance / ((double) (num2 - 1)); double azimuthofLine = line.GetAzimuthofLine(); List<short> list = new List<short>(); for (int i = 0; i < num2; i++) { double num7 = num5 * i; double num8 = Math.Abs((double) (num7 * Math.Sin(azimuthofLine))); double num9 = Math.Abs((double) (num7 * Math.Cos(azimuthofLine))); double x = geoXYPointStart.X + (num3 * num8); double y = geoXYPointStart.Y + (num4 * num9); list.Add(this.GetValueByGeoXYPoint(x, y, isDivInsert)); GeoXYPoint item = new GeoXYPoint(x, y); pointInGeoXYLine.Add(item); } return list.ToArray(); }
private void CalculateModelPathLoss(IList<BinInformation> binInfoList, CWFileInformation fileInfo) { float num = 0f; int num2 = 1; int num3 = 1; foreach (BinInformation binInfo in binInfoList) { if (!binInfo.IsValid) { continue; } GeoXYLine geoXYLine = new GeoXYLine(fileInfo.CellInfo.XYPoint, binInfo.XYPoint); short[] altitudes = base.m_GeoDataObserver.GisInfo.GetValueByGeoXYLine(geoXYLine, (double) fileInfo.CellInfo.Resolution, DemDataType.Height); short[] buildHeights = base.m_GeoDataObserver.GisInfo.GetValueByGeoXYLine(geoXYLine, (double) fileInfo.CellInfo.Resolution, DemDataType.Building); short[] clutters = base.m_GeoDataObserver.GisInfo.GetValueByGeoXYLine(geoXYLine, (double) fileInfo.CellInfo.Resolution, DemDataType.Clutter); float num4 = 0f; if (base.repeatTimes == 1) { num4 = (this.m_ClutterLossMethod == null) ? 0f : this.m_ClutterLossMethod.CalcPointClutterLoss(clutters, base.modelBeforeAdjust, fileInfo.CellInfo.Resolution); } else { num4 = (this.m_ClutterLossMethod == null) ? 0f : this.m_ClutterLossMethod.CalcPointClutterLoss(clutters, base.modelAfterAdjust, fileInfo.CellInfo.Resolution); } float[] numArray4 = (this.m_ClutterLossMethod == null) ? null : this.m_ClutterLossMethod.CalcPointClutterProportion(clutters, base.modelBeforeAdjust, fileInfo.CellInfo.Resolution, base.m_ClutterTypeNum); float num5 = (this.m_EffTxHeightMethod == null) ? this.m_SectionPathLossCalcParam.TxAntennaHeight : this.m_EffTxHeightMethod.CalcPointEffTxHt(this.m_SectionPathLossCalcParam, altitudes); float num6 = (this.m_DiffractionLossCalculator == null) ? 0f : this.m_DiffractionLossCalculator.GetPTPDiffractionLoss(altitudes, binInfo.Distance, buildHeights, clutters); float num7 = (float) Math.Log10((double) num5);//发射天线的有效高度/dB if ((++num2 % 10) == 0) { this.m_UseTime = ((num3 * base.repeatTimes) * this.m_TotalFileIndex) + ((int) ((((float) num2) / ((float) binInfoList.Count)) * num3)); this.m_StatusBarService.SetCurProgress(this.m_UseTime); } if (this.m_DataForAdjust.m_propModel.PropModelName == "ITUR-LTE230") { double distance = System.Math.Pow(10, binInfo.LogDistance); ITUR230PathLossCalculator.k1 = base.modelBeforeAdjust.K1; num = (float)ITUR230PathLossCalculator.getLoss(binInfo.Frequency, distance / 1000, (double)num5, 10, binInfo.ReceiverHeight); } else if (this.m_DataForAdjust.m_propModel.PropModelName == "Okumura-Hata") { float Altha_hr=(float)((1.11*Math.Log10(binInfo.Frequency)-0.7)*num5-(1.56*Math.Log10(binInfo.Frequency)-0.8));//中小城市接收天线校正 float Ccell=0;//城市小区类型校正 float Cterrain=base.modelBeforeAdjust.K1; num = (float)(69.55 + 26.16 * Math.Log10(binInfo.Frequency) - 13.82 * num7 + (44.9 - 6.55 * num7) * binInfo.LogDistance - Altha_hr + Ccell - Cterrain); } else { num = (((((base.modelBeforeAdjust.K1 + (base.modelBeforeAdjust.K2 * binInfo.LogDistance)) + (base.modelBeforeAdjust.K3 * num7)) + (base.modelBeforeAdjust.K4 * num6)) + ((base.modelBeforeAdjust.K5 * binInfo.LogDistance) * num7)) + (base.modelBeforeAdjust.K6 * fileInfo.CellInfo.SectionPathLossCalcParam.RxAntennaHeight)) + (base.modelBeforeAdjust.K7 * num4); } binInfo.ClutterLoss = num4; binInfo.DiffLoss = num6; if (base.repeatTimes == 1) { binInfo.ModelOriPathLoss = num; } binInfo.ClutterProportion = numArray4; } }
public void AddLine(GeoXYLine line, GeoLineStyle lineStyle) { Dictionary<GeoXYLine, GeoLineStyle> lines = new Dictionary<GeoXYLine, GeoLineStyle>(); lines.Add(line, lineStyle); this.AddLines(lines); }
public static List<GeoXYPoint> GetPointsByGeoXYLine(GeoXYLine geoXYLine, double precision) { List<GeoXYPoint> list = new List<GeoXYPoint>(); for (int i = 0; i < (geoXYLine.Points.Count - 1); i++) { List<GeoXYPoint> collection = GetPointsByGeoXYLine(geoXYLine.Points[i], geoXYLine.Points[i + 1], precision); list.AddRange(collection); } return list; }
private void CalculateModelPathLoss(CWFileInformation fileInfo, SpmPropagationModel spmModel) { float num = 0f; //直接用可能已经过滤处理得到的BinInfoList,不用原始的CellBinInfoDic //foreach (KeyValuePair<string, IList<BinInformation>> pair in fileInfo.CellBinInfoDic) //{ // foreach (BinInformation information in pair.Value) foreach (BinInformation binInfo in fileInfo.BinInfoList) { if (binInfo.IsValid) { GeoXYLine geoXYLine = new GeoXYLine(fileInfo.CellInfo.XYPoint, binInfo.XYPoint); short[] altitudes = base.m_GeoDataObserver.GisInfo.GetValueByGeoXYLine(geoXYLine, (double) fileInfo.CellInfo.Resolution, DemDataType.Height); short[] buildHeights = base.m_GeoDataObserver.GisInfo.GetValueByGeoXYLine(geoXYLine, (double) fileInfo.CellInfo.Resolution, DemDataType.Building); short[] clutters = base.m_GeoDataObserver.GisInfo.GetValueByGeoXYLine(geoXYLine, (double) fileInfo.CellInfo.Resolution, DemDataType.Clutter); float num2 = 0f; if ((base.repeatTimes == 1) && (this.m_ClutterLossMethod != null)) { num2 = this.m_ClutterLossMethod.CalcPointClutterLoss(clutters, spmModel, fileInfo.CellInfo.Resolution); } float num3 = (this.m_EffTxHeightMethod == null) ? fileInfo.CellInfo.TxHeight : this.m_EffTxHeightMethod.CalcPointEffTxHt(this.m_SectionPathLossCalcParam, altitudes); float num4 = (float) Math.Log10((double) num3); float num5 = (this.m_DiffractionLossCalculator == null) ? 0f : this.m_DiffractionLossCalculator.GetPTPDiffractionLoss(altitudes, binInfo.Distance, buildHeights, clutters); if (!(this.m_DataForAdjust.m_propModel.PropModelName == "ITUR-LTE230" || this.m_DataForAdjust.m_propModel.PropModelName == "Okumura-Hata")) { num = (((((spmModel.K1 + (spmModel.K2 * binInfo.LogDistance)) + (spmModel.K3 * num4)) + (spmModel.K4 * num5)) + ((spmModel.K5 * binInfo.LogDistance) * num4)) + (spmModel.K6 * fileInfo.CellInfo.SectionPathLossCalcParam.RxAntennaHeight)) + (spmModel.K7 * num2); } else if (this.m_DataForAdjust.m_propModel.PropModelName == "Okumura-Hata") { float temp = spmModel.K1-base.modelBeforeAdjust.K1; num = (float)(binInfo.ModelOriPathLoss - temp); } else { double distance = System.Math.Pow(10, binInfo.LogDistance); ITUR230PathLossCalculator.k1 = spmModel.K1; num = (float)ITUR230PathLossCalculator.getLoss(binInfo.Frequency, distance / 1000, (double)num3, 10, binInfo.ReceiverHeight); } //num = (((((spmModel.K1 + (spmModel.K2 * binInfo.LogDistance)) + (spmModel.K3 * num4)) + (spmModel.K4 * num5)) + ((spmModel.K5 * binInfo.LogDistance) * num4)) + (spmModel.K6 * fileInfo.CellInfo.SectionPathLossCalcParam.RxAntennaHeight)) + (spmModel.K7 * num2); binInfo.ModelAdjPathLoss = num; binInfo.ModelAdjError = (binInfo.ActualPathLoss - binInfo.ModelAdjPathLoss) / spmModel.K7; this.m_DeltaPathLossMatrixList.Add(binInfo.ModelAdjError); } } base.deltaPathLossMatrix = new float[this.m_DeltaPathLossMatrixList.Count]; base.deltaPathLossMatrix = this.m_DeltaPathLossMatrixList.ToArray(); }
private void CalculateModelPathLoss(IList<FileInfoBase> dtFileList, SpmPropagationModel spmModel, bool isAdjustClutter) { int num = 1; float num2 = 1.5f; foreach (CWFileInformation fileInfo in dtFileList) { foreach (BinInformation binInfo in fileInfo.BinInfoList) { if (binInfo.IsValid) { GeoXYLine geoXYLine = new GeoXYLine(fileInfo.CellInfo.XYPoint, binInfo.XYPoint); short[] clutters = base.m_GeoDataObserver.GisInfo.GetValueByGeoXYLine(geoXYLine, (double) fileInfo.CellInfo.Resolution, DemDataType.Clutter); float num3 = (this.m_ClutterLossMethod == null) ? 0f : this.m_ClutterLossMethod.CalcPointClutterLoss(clutters, spmModel, fileInfo.CellInfo.Resolution); binInfo.ModelAdjPathLoss += num3 * spmModel.K7; binInfo.ModelAdjError = binInfo.ActualPathLoss - binInfo.ModelAdjPathLoss; if ((++num % 10) == 0) { this.m_UseTime1 = (int) ((((num2 * base.repeatTimes) * 0.1) * this.tempFileIndex) + ((((float) num) / ((float) fileInfo.BinInfoList.Count)) * num2)); this.m_StatusBarService.SetCurProgress(this.m_UseTime + this.m_UseTime1); } } } this.tempFileIndex++; } }
public static List<GeoXYPoint> GetPointsByGeoXYLine(GeoXYPoint startPoint, GeoXYPoint endPoint, double precision) { GeoXYPoint point; GeoXYPoint point2; List<GeoXYPoint> list = new List<GeoXYPoint>(); GeoXYLine tempGeoXYLine = new GeoXYLine(startPoint, endPoint); double xOffSetValue = 0.0; double yOffSetValue = 0.0; GetXYOffset(tempGeoXYLine, precision, ref xOffSetValue, ref yOffSetValue); bool isNeedReverse = false; isNeedReverse = MakeLargeAndSmallPoint(startPoint, endPoint, isNeedReverse, out point, out point2); if (point.X <= point2.X) { while ((point.X < point2.X) && (point.Y > point2.Y)) { list.Add(point.Clone()); point.X += xOffSetValue; point.Y -= yOffSetValue; } } else { while ((point.X > point2.X) && (point.Y > point2.Y)) { list.Add(point.Clone()); point.X -= xOffSetValue; point.Y -= yOffSetValue; } } list.Add(point2.Clone()); if (isNeedReverse) { list.Reverse(); } return list; }
public short[] GetValueByGeoXYLine(GeoXYLine geoXYLine, double precision) { return this.GetValueByGeoXYLine(geoXYLine, precision, false); }