Ejemplo n.º 1
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="aILayer">raster layer</param>
 /// <param name="aLayersLegend">layersLegend</param>
 public RasterLayerSet(RasterLayer aILayer, LayersLegend aLayersLegend)
 {
     m_LayersLegend               = aLayersLegend;
     m_LayerName                  = aILayer.LayerName;
     m_FileName                   = aILayer.FileName;
     m_WorldFileName              = aILayer.WorldFileName;
     m_Handle                     = aILayer.Handle;
     m_LayerType                  = aILayer.LayerDrawType;
     m_Visible                    = aILayer.Visible;
     m_WFP                        = aILayer.WorldFileParaV;
     m_XUL                        = aILayer.WorldFileParaV.XUL;
     m_YUL                        = aILayer.WorldFileParaV.YUL;
     m_XScale                     = aILayer.WorldFileParaV.XScale;
     m_YScale                     = aILayer.WorldFileParaV.YScale;
     m_Extent                     = aILayer.Extent;
     m_Width                      = m_Extent.maxX - m_Extent.minX;
     m_Height                     = m_Extent.minY - m_Extent.maxY;
     m_XNum                       = aILayer.Image.Width;
     m_YNum                       = aILayer.Image.Height;
     m_IsMaskout                  = aILayer.IsMaskout;
     m_LegendSchemeE              = new LegendSchemeE();
     m_LegendSchemeE.LayerHandle  = aILayer.Handle;
     m_LegendSchemeE.LegendScheme = aILayer.LegendScheme;
     m_LegendSchemeE.LayersTV     = aLayersLegend;
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Write image world file
        /// </summary>
        /// <param name="aFile"></param>
        /// <param name="aWFP"></param>
        public void WriteImageWorldFile(string aFile, WorldFilePara aWFP)
        {
            StreamWriter sw = new StreamWriter(aFile);

            sw.WriteLine(aWFP.XScale.ToString());
            sw.WriteLine(aWFP.YRotate.ToString());
            sw.WriteLine(aWFP.XRotate.ToString());
            sw.WriteLine(aWFP.YScale.ToString());
            sw.WriteLine(aWFP.XUL.ToString());
            sw.WriteLine(aWFP.YUL.ToString());
            sw.Close();
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Update grid data
        /// </summary>
        public void UpdateGridData()
        {
            WorldFilePara aWFP = new WorldFilePara();

            //aWFP.XUL = _gridData.X[0];
            //aWFP.YUL = _gridData.Y[GridData.YNum - 1];
            aWFP.XUL    = _gridData.X[0] - _gridData.XDelt / 2;
            aWFP.YUL    = _gridData.Y[_gridData.YNum - 1] + _gridData.YDelt / 2;
            aWFP.XScale = _gridData.XDelt;
            aWFP.YScale = -_gridData.YDelt;

            aWFP.XRotate = 0;
            aWFP.YRotate = 0;

            WorldFileParaV = aWFP;

            UpdateExtent();
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="aILayer"></param>
 /// <param name="aLayersLegend"></param>
 public ImageLayerSet(ImageLayer aILayer, LayersLegend aLayersLegend)
 {
     m_LayersLegend        = aLayersLegend;
     m_LayerName           = aILayer.LayerName;
     m_FileName            = aILayer.FileName;
     m_WorldFileName       = aILayer.WorldFileName;
     m_Handle              = aILayer.Handle;
     m_LayerType           = aILayer.LayerDrawType;
     m_Visible             = aILayer.Visible;
     m_WFP                 = aILayer.WorldFileParaV;
     m_XUL                 = aILayer.WorldFileParaV.XUL;
     m_YUL                 = aILayer.WorldFileParaV.YUL;
     m_XScale              = aILayer.WorldFileParaV.XScale;
     m_YScale              = aILayer.WorldFileParaV.YScale;
     m_Extent              = aILayer.Extent;
     m_Width               = m_Extent.maxX - m_Extent.minX;
     m_Height              = m_Extent.minY - m_Extent.maxY;
     m_XNum                = aILayer.Image.Width;
     m_YNum                = aILayer.Image.Height;
     m_IsMaskout           = aILayer.IsMaskout;
     _TransparencyPerc     = aILayer.TransparencyPerc;
     _SetTransparencyColor = aILayer.SetTransColor;
     _TransparencyColor    = aILayer.TransparencyColor;
 }