Ejemplo n.º 1
0
 public GeoRasterLayer(IGeoRasterData geoRasterData, List<GeoRasterStyle> styles, IGeoRasterRender render)
 {
     this.m_Styles = new List<GeoRasterStyle>();
     this.m_Transparency = 0xff;
     this.m_HeightRenderStyle = HeightStyle.FullColor;
     this.m_RasterData = geoRasterData;
     this.m_Render = render;
     geoRasterData.OnDataChanged += new DataChangedEventHandler(this.RasieLayerChangedEvent);
     this.m_Styles.AddRange(styles);
     this.InitTransparency();
     base.GenerateLayerName(this.m_RasterData);
 }
Ejemplo n.º 2
0
 public static IGeoRasterRender CreateRasterRender(IGeoRasterData rasterData)
 {
     if (rasterData is GeoPlanetClutterData)
     {
         return new GeoClutterRender(rasterData as GeoDiscreteData);
     }
     if (rasterData is GeoPlanetHeightData)
     {
         return new GeoHeightRender(rasterData as GeoIntervalData);
     }
     if (rasterData is GeoBitmapData)
     {
         return new GeoImageRender(rasterData);
     }
     return new GeoUniversalRasterRender(rasterData);
 }
Ejemplo n.º 3
0
 public GeoRasterLayer(IGeoRasterData geoRasterData, List<GeoRasterStyle> styles) : this(geoRasterData, styles, new GeoUniversalRasterRender(geoRasterData))
 {
 }
Ejemplo n.º 4
0
 private static short ReadGridDataByPointCore(GeoXYPoint geoXYPoint, IGeoRasterData geoRasterData, DemDataType demDataType, bool isDivInsert)
 {
     return geoRasterData.GetValueByPoint<short>(geoXYPoint, isDivInsert);
 }
Ejemplo n.º 5
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;
         }
     }
 }
Ejemplo n.º 6
0
 private void ReadGridDataByLine(GeoXYLine geoXYLine, double precision, IGeoRasterData geoRasterData, Dictionary<double, List<short>> gridValueByLineDict, bool isDivInsert)
 {
     short[] collection = geoRasterData.GetValueByLine<short>(geoXYLine, precision, isDivInsert);
     lock (this.lineThreadTag)
     {
         List<short> list = new List<short>();
         list.AddRange(collection);
         double resolution = geoRasterData.Resolution;
         while (gridValueByLineDict.ContainsKey(resolution))
         {
             resolution += 0.0001;
         }
         if (!gridValueByLineDict.ContainsKey(resolution))
         {
             gridValueByLineDict.Add(resolution, list);
         }
     }
 }
Ejemplo n.º 7
0
 private void ReadGridDataByGeoCalcBound(GeoCalcBound geoCalcBound, IGeoRasterData geoDemData, Dictionary<double, List<short>> gridValueByPointDict)
 {
     short[] valueByCalcBound = geoDemData.GetValueByCalcBound<short>(geoCalcBound);
     lock (this.boundThreadTag)
     {
         List<short> list = new List<short>();
         list.AddRange(valueByCalcBound);
         double resolution = geoDemData.Resolution;
         while (gridValueByPointDict.ContainsKey(resolution))
         {
             resolution += 0.0001;
         }
         if (!gridValueByPointDict.ContainsKey(resolution))
         {
             gridValueByPointDict.Add(resolution, list);
         }
     }
 }
Ejemplo n.º 8
0
 public RasterLayerPara(IGeoRasterData rasterData, List<GeoRasterStyle> rasterStyle, IGeoRasterRender rasterRender)
 {
     this.m_RasterData = rasterData;
     this.m_RasterStyles = rasterStyle;
     this.m_RasterRender = rasterRender;
 }
Ejemplo n.º 9
0
 private short[] GetDatas(GeoXYRect geoXYRect, IGeoRasterData rasterData)
 {
     if (rasterData == null)
     {
         return null;
     }
     GeoCalcBound geoCalcBound = new GeoCalcBound(geoXYRect, rasterData.Resolution);
     return rasterData.GetValueByCalcBound<short>(geoCalcBound);
 }
Ejemplo n.º 10
0
 private short[] GetDatas(Huawei.UNet.GIS.GeoInterface.GeoPolygon geoPolygon, IGeoRasterData geoRasterData)
 {
     if (geoRasterData == null)
     {
         return null;
     }
     GeoXYRect miniEnclosingRect = geoPolygon.GetMiniEnclosingRect();
     GeoCalcBound geoCalcBound = new GeoCalcBound(miniEnclosingRect, geoRasterData.Resolution);
     short[] datas = this.GetDatas(miniEnclosingRect, geoRasterData);
     if (datas.Length == 0)
     {
         return null;
     }
     List<short> valueInPolygon = new List<short>();
     double tempX = 0.0;
     double tempY = 0.0;
     tempX = geoCalcBound.Left;
     tempY = geoCalcBound.Top;
     for (int i = 0; i < geoCalcBound.RectRows; i++)
     {
         tempX = geoCalcBound.Left;
         tempY = geoCalcBound.Top - (i * geoCalcBound.CalcWidth);
         this.GetOneLineXDatas(geoCalcBound, tempX, tempY, geoPolygon, ref datas, ref valueInPolygon);
     }
     return valueInPolygon.ToArray();
 }