Ejemplo n.º 1
0
        public static void TryCorrectCenterWaveNum(RSS.Core.DF.IRasterDataProvider dataProvider, int midIfrBandNo, int farIfrBandNo, ref float midIfrCenterWaveNum, ref float farIfrCenterWaveNum, IContextMessage contextMessage)
        {
            DataIdentify id = dataProvider.DataIdentify;

            if (id != null && !string.IsNullOrEmpty(id.Satellite) && !string.IsNullOrEmpty(id.Sensor))
            {
                BandnameRefTable tb = BandRefTableHelper.GetBandRefTable(id.Satellite, id.Sensor);
                if (tb != null)
                {
                    float        wn   = 0;
                    BandnameItem item = tb.GetBandItem(midIfrBandNo);
                    if (item != null)
                    {
                        wn = item.CenterWaveNumber;
                        if (wn > float.Epsilon)
                        {
                            midIfrCenterWaveNum = wn;
                        }
                    }
                    item = tb.GetBandItem(farIfrBandNo);
                    if (item != null)
                    {
                        wn = item.CenterWaveNumber;
                        if (wn > float.Epsilon)
                        {
                            farIfrCenterWaveNum = wn;
                        }
                    }
                }
            }
            //
            if (farIfrCenterWaveNum < float.Epsilon)
            {
                farIfrCenterWaveNum = 912;
                PrintInfo(contextMessage, "     通过卫星、传感器获远红外中心波数失败,使用缺省值:912。");
            }
            if (midIfrCenterWaveNum < float.Epsilon)
            {
                midIfrCenterWaveNum = 2640;
                PrintInfo(contextMessage, "     通过卫星、传感器获中红外中心波数失败,使用缺省值:2640。");
            }
        }
Ejemplo n.º 2
0
 private void button12_Click(object sender, EventArgs e)
 {
     BandnameRefTable table = BandRefTableHelper.GetBandRefTable("FY3A", "VIRR");
 }