private short BoundParaCheck(int indexOfRect, GeoCalcBound geoCalcBound, DemDataType demDataType, int layerIndex, ref bool flag) { flag = this.CheckBoundIndex(indexOfRect, geoCalcBound, demDataType, layerIndex); if (flag) { return -32768; } if (this.GetRasterData(demDataType).Count == 0) { flag = true; return 0; } flag = false; return 0; }
private bool CheckBoundIndex(int indexOfRect, GeoCalcBound geoCalcBound, DemDataType demDataType, int layerIndex) { return (((indexOfRect < 0) || (indexOfRect > (geoCalcBound.ArrayLength - 1))) || ((this.GetRasterData(demDataType).Count - 1) < layerIndex)); }
public short GetValueByGeoXYPoint(double x, double y, DemDataType demDataType) { //throw new NotImplementedException(); return 0; }
public short[] GetValueByGeoCalcBound(GeoCalcBound geoCalcBound, DemDataType demDataType) { //hrow new NotImplementedException(); //short[] short[] count = new short[1] {0 }; return count; }
public short GetValueByGeoXYPoint(double x, double y, DemDataType demDataType, bool isDivInsert) { return 0; }
private List<short> RunReadGridThread(double x, double y, DemDataType demDataType, bool isDivInsert) { Dictionary<double, List<short>> gridValueByPointDict = new Dictionary<double, List<short>>(); List<IGeoRasterData> rasterDataList = new List<IGeoRasterData>(); rasterDataList = this.GetRasterData(demDataType); rasterDataList = this.CheckRasterData(rasterDataList, new GeoXYPoint(x, y), 20.0); foreach (IGeoRasterData data in rasterDataList) { this.ReadGridDataByPoint(new GeoXYPoint(x, y), data, gridValueByPointDict, demDataType, isDivInsert); } return GetGridData(gridValueByPointDict); }
private List<short> RunReadGridThread(GeoXYLine geoXYLine, double precision, DemDataType demDataType) { return this.RunReadGridThread(geoXYLine, precision, demDataType, true); }
private static short ReadGridDataByPointCore(GeoXYPoint geoXYPoint, IGeoRasterData geoRasterData, DemDataType demDataType, bool isDivInsert) { return geoRasterData.GetValueByPoint<short>(geoXYPoint, isDivInsert); }
public short[] GetValueByGeoCalcBound(GeoCalcBound geoCalcBound, DemDataType demDataType) { short[] numArray; try { bool flag = false; short[] numArray2 = this.DemDataTypeCheckByGeoCalcBound(geoCalcBound, demDataType, ref flag); if (flag) { return numArray2; } List<short> list = this.RunReadGridThread(geoCalcBound, demDataType); if (list.Count == 0) { int num = geoCalcBound.RectColumns * geoCalcBound.RectRows; for (int i = 0; i < num; i++) { list.Add(-32768); } } return list.ToArray(); } catch { int rectRows = geoCalcBound.RectRows; int rectColumns = geoCalcBound.RectColumns; numArray = new short[rectRows * rectColumns]; } return numArray; }
private List<IGeoRasterData> GetRasterData(DemDataType demDataType) { if (this.m_DemDataColletion.ContainsKey(demDataType)) { return this.m_DemDataColletion[demDataType]; } return new List<IGeoRasterData>(); }
public double GetMapHighestResolution(DemDataType demDataType) { List<IGeoRasterData> rasterData = this.GetRasterData(demDataType); double num = 50.0; if ((rasterData != null) && (rasterData.Count != 0)) { foreach (IGeoRasterData data in rasterData) { num = Math.Min(num, data.Resolution); } } return num; }
private short GetHeightByRectBoundAssist(int indexInRect, GeoCalcBound geoCalcBound, DemDataType demDataType, int layerIndex) { if ((!geoCalcBound.Equals(this.m_geoHeightCalcBound) || (this.m_HeightlayerIndex != layerIndex)) || (this.m_HeightValueArray == null)) { this.m_HeightlayerIndex = layerIndex; this.m_geoHeightCalcBound = geoCalcBound; this.m_HeightValueArray = this.GetValueByGeoCalcBound(geoCalcBound, demDataType); } return this.m_HeightValueArray[indexInRect]; }
private void GeoBoundParaException(GeoCalcBound geoCalcBound, DemDataType demDataType) { if (geoCalcBound.CalcWidth < 0.10000000149011612) { throw new GeoParamIllegalException(); } if (this.GetRasterData(demDataType) == null) { throw new GeoNullException(); } }
private short[] DemDataTypeCheckByGeoXYLine(GeoXYLine geoXYLine, double precision, DemDataType demDataType, ref bool Flag) { if (this.GetRasterData(demDataType).Count == 0) { Flag = true; int num = 0; num = Convert.ToInt32(Math.Ceiling((double) (geoXYLine.GetDistance() / precision))) + 1; short[] numArray = new short[num]; if (demDataType == DemDataType.Clutter) { for (int i = 0; i < num; i++) { numArray[i] = -1; } } return numArray; } Flag = false; return null; }
private short[] DemDataTypeCheckByGeoCalcBound(GeoCalcBound geoCalcBound, DemDataType demDataType, ref bool Flag) { if (this.GetRasterData(demDataType).Count == 0) { Flag = true; int rectRows = geoCalcBound.RectRows; int rectColumns = geoCalcBound.RectColumns; short[] numArray = new short[rectRows * rectColumns]; if (demDataType == DemDataType.Clutter) { for (int i = 0; i < numArray.Length; i++) { numArray[i] = -1; } } return numArray; } Flag = false; return null; }
private short GetValueByXYPointParaCheck(DemDataType demDataType, ref bool flag) { if (this.GetRasterData(demDataType) == null) { throw new GeoNullException(); } if ((this.GetRasterData(demDataType).Count == 0) && (demDataType == DemDataType.Height)) { flag = true; return 0; } if ((this.GetRasterData(demDataType).Count == 0) && (demDataType == DemDataType.Clutter)) { flag = true; return -1; } flag = false; return 0; }
private void ReadGridDataByPoint(GeoXYPoint geoXYPoint, IGeoRasterData geoRasterData, Dictionary<double, List<short>> gridValueByPointDict, DemDataType demDataType, bool isDivInsert) { short item = ReadGridDataByPointCore(geoXYPoint, geoRasterData, demDataType, isDivInsert); if (((item != -32768) && (item < 0)) && (demDataType == DemDataType.Clutter)) { item = (short) (item + 0x100); } lock (this.pointThreadTag) { List<short> list = new List<short>(); list.Add(item); if (!gridValueByPointDict.ContainsKey(geoRasterData.Resolution)) { gridValueByPointDict.Add(geoRasterData.Resolution, list); } else if (item != -32768) { gridValueByPointDict[geoRasterData.Resolution] = list; } } }
public short[] GetValueByGeoXYLine(GeoXYLine geoXYLine, double precision, DemDataType demDataType) { return this.GetValueByGeoXYLine(geoXYLine, precision, demDataType, true); }
private List<short> RunReadGridThread(GeoCalcBound geoCalcBound, DemDataType demDataType) { Dictionary<double, List<short>> gridValueByPointDict = new Dictionary<double, List<short>>(); List<IGeoRasterData> rasterDataList = new List<IGeoRasterData>(); rasterDataList = this.GetRasterData(demDataType); rasterDataList = this.CheckRasterData(rasterDataList, new GeoXYRect(geoCalcBound.Left, geoCalcBound.Right, geoCalcBound.Bottom, geoCalcBound.Top), geoCalcBound.CalcWidth); foreach (IGeoRasterData data in rasterDataList) { this.ReadGridDataByGeoCalcBound(geoCalcBound, data, gridValueByPointDict); } return GetGridData(gridValueByPointDict); }
public short[] GetValueByGeoXYLine(GeoXYLine geoXYLine, double precision, DemDataType demDataType, bool isDivInsert) { List<short> list; bool flag = false; short[] numArray = this.DemDataTypeCheckByGeoXYLine(geoXYLine, precision, demDataType, ref flag); if (flag) { return numArray; } if (demDataType == DemDataType.Clutter) { list = this.RunReadGridThread(geoXYLine, precision, demDataType, false); } else { list = this.RunReadGridThread(geoXYLine, precision, demDataType, isDivInsert); } return list.ToArray(); }
private List<short> RunReadGridThread(GeoXYLine geoXYLine, double precision, DemDataType demDataType, bool isDivInsert) { Dictionary<double, List<short>> gridValueByLineDict = new Dictionary<double, List<short>>(); List<IGeoRasterData> rasterDataList = new List<IGeoRasterData>(); rasterDataList = this.GetRasterData(demDataType); rasterDataList = this.CheckRasterData(rasterDataList, geoXYLine, precision); foreach (IGeoRasterData data in rasterDataList) { this.ReadGridDataByLine(geoXYLine, precision, data, gridValueByLineDict, isDivInsert); } return GetGridData(gridValueByLineDict); }
public short GetValueByGeoXYPoint(GeoXYPoint pnt, DemDataType demDataType) { return this.GetValueByGeoXYPoint(pnt, demDataType, true); }
public short GetValueByGeoXYPoint(GeoXYPoint pnt, DemDataType demDataType, bool isDivInsert) { return this.GetValueByGeoXYPoint(pnt.X, pnt.Y, demDataType, isDivInsert); }
public short GetValueByGeoXYPoint(double x, double y, DemDataType demDataType) { return this.GetValueByGeoXYPoint(x, y, demDataType, true); }
public double GetMapHighestResolution(DemDataType demDataType) { throw new NotImplementedException(); }
public short GetValueByGeoXYPoint(double x, double y, DemDataType demDataType, bool isDivInsert) { bool flag = false; short valueByXYPointParaCheck = this.GetValueByXYPointParaCheck(demDataType, ref flag); if (flag) { return valueByXYPointParaCheck; } List<short> list = this.RunReadGridThread(x, y, demDataType, isDivInsert); if (list.Count == 0) { return -32768; } return list[0]; }
public short[] GetValueByGeoXYLine(GeoXYLine geoXYLine, double precision, DemDataType demDataType) { throw new NotImplementedException(); }
private short GetValueByPoint(int indexInRect, GeoCalcBound geoCalcBound, DemDataType demDataType, int layerIndex) { if (this.m_GetValueByPointDelegateDict.ContainsKey(demDataType)) { return this.m_GetValueByPointDelegateDict[demDataType](indexInRect, geoCalcBound, demDataType, layerIndex); } return 0; }
public short GetValueByGeoXYPoint(GeoXYPoint pnt, DemDataType demDataType, bool isDivInsert) { throw new NotImplementedException(); }
public short[] GetValueByGeoCalcBound(GeoCalcBound geoCalcBound, DemDataType demDataType) { throw new NotImplementedException(); }