Exemplo n.º 1
0
        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)));
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 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;
        }
Exemplo n.º 4
0
        public static ProductDef GetProductDef(string themeIdentify, string productIdentify)
        {
            ThemeDef theme = GetThemeDefByIdentify(themeIdentify);

            if (theme == null)
            {
                return(null);
            }
            return(theme.GetProductDefByIdentify(productIdentify));
        }
Exemplo n.º 5
0
        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);
        }