public static IArgumentProvider GetArgumentProvider(ExtractProductIdentify productIdentify, ExtractAlgorithmIdentify algorithmIdentify)
        {
            if (productIdentify == null || algorithmIdentify == null)
            {
                return(null);
            }
            ThemeDef theme = GetThemeDefByIdentify(productIdentify.ThemeIdentify);

            if (theme == null)
            {
                return(null);
            }
            ProductDef prd = theme.GetProductDefByIdentify(productIdentify.ProductIdentify);

            if (prd == null)
            {
                return(null);
            }
            SubProductDef subPrd = prd.GetSubProductDefByIdentify(productIdentify.SubProductIdentify);

            if (subPrd == null)
            {
                return(null);
            }
            AlgorithmDef      alg    = subPrd.GetAlgorithmDefByAlgorithmIdentify(algorithmIdentify);
            IArgumentProvider argprd = CreateArgumentProvider(alg, BandRefTableHelper.GetBandRefTable(algorithmIdentify.Satellite, algorithmIdentify.Sensor));

            if (argprd != null)
            {
                argprd.SetArg("AlgorithmName", alg.Identify);
            }
            return(argprd);
        }
        public static IArgumentProvider GetArgumentProvider(ExtractProductIdentify productIdentify, string algorithmIdentify, string satellite, string sensor)
        {
            if (productIdentify == null || algorithmIdentify == null)
            {
                return(null);
            }
            ThemeDef theme = GetThemeDefByIdentify(productIdentify.ThemeIdentify);

            if (theme == null)
            {
                return(null);
            }
            ProductDef prd = theme.GetProductDefByIdentify(productIdentify.ProductIdentify);

            if (prd == null)
            {
                return(null);
            }
            SubProductDef subPrd = prd.GetSubProductDefByIdentify(productIdentify.SubProductIdentify);

            if (subPrd == null)
            {
                return(null);
            }
            AlgorithmDef alg = subPrd.GetAlgorithmDefByIdentify(algorithmIdentify);

            return(CreateArgumentProvider(alg, BandRefTableHelper.GetBandRefTable(satellite, sensor)));
        }
Example #3
0
        private void GetProductNameByIdentify()
        {
            if (string.IsNullOrEmpty(ProductIdentify))
            {
                return;
            }
            ThemeDef theme = MonitoringThemeFactory.GetThemeDefByIdentify("CMA");

            if (theme == null)
            {
                return;
            }
            ProductDef pro = theme.GetProductDefByIdentify(ProductIdentify);

            if (pro == null)
            {
                return;
            }
            ProductName = pro.Name;
            if (string.IsNullOrEmpty(SubProductIdentify))
            {
                return;
            }
            SubProductDef subPro = pro.GetSubProductDefByIdentify(SubProductIdentify);

            if (subPro == null)
            {
                return;
            }
            SubProductName = subPro.Name;
        }
Example #4
0
        protected virtual void Init(ProductDef productDef)
        {
            _productDef = productDef;
            _identify   = productDef.Identify;
            _name       = productDef.Name;
            Dictionary <string, Type> subprds = LoadSubProducts();

            if (subprds != null)
            {
                foreach (string id in subprds.Keys)
                {
                    SubProductDef def = _productDef.GetSubProductDefByIdentify(id);
                    object        obj = Activator.CreateInstance(subprds[id], def);
                    if (obj != null)
                    {
                        _subProducts.Add(obj as IMonitoringSubProduct);
                    }
                }
            }
        }
        public static IArgumentProvider GetArgumentProvider(ExtractProductIdentify productIdentify, string algorithmIdentify)
        {
            if (productIdentify == null || algorithmIdentify == null)
            {
                return(null);
            }
            ThemeDef theme = GetThemeDefByIdentify(productIdentify.ThemeIdentify);

            if (theme == null)
            {
                return(null);
            }
            ProductDef prd = theme.GetProductDefByIdentify(productIdentify.ProductIdentify);

            if (prd == null)
            {
                return(null);
            }
            SubProductDef subPrd = prd.GetSubProductDefByIdentify(productIdentify.SubProductIdentify);

            if (subPrd == null)
            {
                return(null);
            }
            AlgorithmDef      alg    = subPrd.GetAlgorithmDefByIdentify(algorithmIdentify);
            IArgumentProvider argPrd = CreateArgumentProvider(alg, null);

            if (alg.Bands != null)
            {
                foreach (BandDef b in alg.Bands)
                {
                    argPrd.SetArg(b.Identify, b.BandNo);
                }
            }
            return(argPrd);
        }
Example #6
0
        protected override void Init(GeoDo.RSS.MIF.Core.ProductDef productDef)
        {
            base.Init(productDef);
            _identify = productDef.Identify;
            SubProductDef subProductDef = productDef.GetSubProductDefByIdentify("DBLV");

            if (subProductDef != null)
            {
                _subProducts.Add(new SubProductBinaryBag(subProductDef));
            }
            subProductDef = productDef.GetSubProductDefByIdentify("0CLM");
            if (subProductDef != null)
            {
                _subProducts.Add(new SubProductBinaryCLM(subProductDef));
            }
            subProductDef = productDef.GetSubProductDefByIdentify("WTGS");
            if (subProductDef != null)
            {
                _subProducts.Add(new SubProductBinaryWTGS(subProductDef));
            }
            subProductDef = productDef.GetSubProductDefByIdentify("BPCD");
            if (subProductDef != null)
            {
                _subProducts.Add(new SubProductPixelCoverRate(subProductDef));
            }
            subProductDef = productDef.GetSubProductDefByIdentify("BACD");
            if (subProductDef != null)
            {
                _subProducts.Add(new SubProductBAGCoverDegree(subProductDef));
            }
            subProductDef = productDef.GetSubProductDefByIdentify("BCCA");
            if (subProductDef != null)
            {
                _subProducts.Add(new SubProductBagStatisticArea(subProductDef));
            }
            subProductDef = productDef.GetSubProductDefByIdentify("BCDA");
            if (subProductDef != null)
            {
                _subProducts.Add(new SubProductBagStatAreaByDegree(subProductDef));
            }
            subProductDef = productDef.GetSubProductDefByIdentify("BCDE");
            if (subProductDef != null)
            {
                _subProducts.Add(new SubProductBagStatAreaByIntensity(subProductDef));
            }
            subProductDef = productDef.GetSubProductDefByIdentify("0IMG");
            if (subProductDef != null)
            {
                _subProducts.Add(new SubProductIMGBAG(subProductDef));
            }
            subProductDef = productDef.GetSubProductDefByIdentify("STAT");
            if (subProductDef != null)
            {
                _subProducts.Add(new SubProductSTATBAG(subProductDef));
            }
            subProductDef = productDef.GetSubProductDefByIdentify("FREQ");
            if (subProductDef != null)
            {
                _subProducts.Add(new SubProductFREQBAG(subProductDef));
            }
            subProductDef = productDef.GetSubProductDefByIdentify("BCDF");
            if (subProductDef != null)
            {
                _subProducts.Add(new SubProductBAGFreqByCoverDegree(subProductDef));
            }
            subProductDef = productDef.GetSubProductDefByIdentify("BCAF");
            if (subProductDef != null)
            {
                _subProducts.Add(new SubProductBAGFreqByCoverArea(subProductDef));
            }
            subProductDef = productDef.GetSubProductDefByIdentify("TFRV");
            if (subProductDef != null)
            {
                _subProducts.Add(new SubProductTFRVBAG(subProductDef));
            }
            subProductDef = productDef.GetSubProductDefByIdentify("THAN");
            if (subProductDef != null)
            {
                _subProducts.Add(new SubProductTHANBAG(subProductDef));
            }
            subProductDef = productDef.GetSubProductDefByIdentify("FREO");
            if (subProductDef != null)
            {
                _subProducts.Add(new SubProductFREQBAGOld(subProductDef));
            }
            subProductDef = productDef.GetSubProductDefByIdentify("BCDO");
            if (subProductDef != null)
            {
                _subProducts.Add(new SubProductBAGOldFreqByCoverDegree(subProductDef));
            }
        }