Example #1
0
 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;
 }
Example #2
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));
 }
Example #3
0
 public short GetValueByGeoXYPoint(double x, double y, DemDataType demDataType)
 {
     //throw new NotImplementedException();
     return 0;
 }
Example #4
0
 public short[] GetValueByGeoCalcBound(GeoCalcBound geoCalcBound, DemDataType demDataType)
 {
     //hrow new NotImplementedException();
     //short[] 
     short[] count = new short[1] {0 };
     return count;
 }
Example #5
0
 public short GetValueByGeoXYPoint(double x, double y, DemDataType demDataType, bool isDivInsert)
 {
     return 0;
 }
Example #6
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);
 }
Example #7
0
 private List<short> RunReadGridThread(GeoXYLine geoXYLine, double precision, DemDataType demDataType)
 {
     return this.RunReadGridThread(geoXYLine, precision, demDataType, true);
 }
Example #8
0
 private static short ReadGridDataByPointCore(GeoXYPoint geoXYPoint, IGeoRasterData geoRasterData, DemDataType demDataType, bool isDivInsert)
 {
     return geoRasterData.GetValueByPoint<short>(geoXYPoint, isDivInsert);
 }
Example #9
0
 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;
 }
Example #10
0
 private List<IGeoRasterData> GetRasterData(DemDataType demDataType)
 {
     if (this.m_DemDataColletion.ContainsKey(demDataType))
     {
         return this.m_DemDataColletion[demDataType];
     }
     return new List<IGeoRasterData>();
 }
Example #11
0
 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;
 }
Example #12
0
 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];
 }
Example #13
0
 private void GeoBoundParaException(GeoCalcBound geoCalcBound, DemDataType demDataType)
 {
     if (geoCalcBound.CalcWidth < 0.10000000149011612)
     {
         throw new GeoParamIllegalException();
     }
     if (this.GetRasterData(demDataType) == null)
     {
         throw new GeoNullException();
     }
 }
Example #14
0
 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;
 }
Example #15
0
 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;
 }
Example #16
0
 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;
 }
Example #17
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;
         }
     }
 }
Example #18
0
 public short[] GetValueByGeoXYLine(GeoXYLine geoXYLine, double precision, DemDataType demDataType)
 {
     return this.GetValueByGeoXYLine(geoXYLine, precision, demDataType, true);
 }
Example #19
0
 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);
 }
Example #20
0
 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();
 }
Example #21
0
 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);
 }
Example #22
0
 public short GetValueByGeoXYPoint(GeoXYPoint pnt, DemDataType demDataType)
 {
     return this.GetValueByGeoXYPoint(pnt, demDataType, true);
 }
Example #23
0
 public short GetValueByGeoXYPoint(GeoXYPoint pnt, DemDataType demDataType, bool isDivInsert)
 {
     return this.GetValueByGeoXYPoint(pnt.X, pnt.Y, demDataType, isDivInsert);
 }
Example #24
0
 public short GetValueByGeoXYPoint(double x, double y, DemDataType demDataType)
 {
     return this.GetValueByGeoXYPoint(x, y, demDataType, true);
 }
Example #25
0
 public double GetMapHighestResolution(DemDataType demDataType)
 {
     throw new NotImplementedException();
 }
Example #26
0
 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];
 }
Example #27
0
 public short[] GetValueByGeoXYLine(GeoXYLine geoXYLine, double precision, DemDataType demDataType)
 {
     throw new NotImplementedException();
 }
Example #28
0
 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;
 }
Example #29
0
 public short GetValueByGeoXYPoint(GeoXYPoint pnt, DemDataType demDataType, bool isDivInsert)
 {
     throw new NotImplementedException();
 }
Example #30
0
 public short[] GetValueByGeoCalcBound(GeoCalcBound geoCalcBound, DemDataType demDataType)
 {
     throw new NotImplementedException();
 }