Exemplo n.º 1
0
 /// <summary>
 /// Engine Constructor
 /// </summary>
 /// <param name="name"></param>
 /// <param name="folder"></param>
 /// <param name="maskField"></param>
 /// <param name="dod"></param>
 public BudgetSegregation(string name, DirectoryInfo folder, Masks.AttributeFieldMask mask, DoDBase dod)
     : base(name)
 {
     DoD                   = dod;
     Folder                = folder;
     Mask                  = mask;
     ClassLegend           = new FileInfo(Path.Combine(Folder.FullName, "ClassLegend.csv"));
     SummaryXML            = new FileInfo(Path.Combine(Folder.FullName, "Summary.xml"));
     Classes               = new Dictionary <string, BudgetSegregationClass>();
     MorphologicalAnalyses = new List <Morphological.MorphologicalAnalysis>();
 }
Exemplo n.º 2
0
 /// <summary>
 /// Serialization constructor
 /// </summary>
 /// <param name="name"></param>
 /// <param name="folder"></param>
 /// <param name="polygonMask"></param>
 /// <param name="maskField"></param>
 /// <param name="dod"></param>
 /// <param name="summaryXML"></param>
 /// <param name="classLegend"></param>
 public BudgetSegregation(string name, DirectoryInfo folder, Masks.AttributeFieldMask mask, DoDBase dod, FileInfo summaryXML, FileInfo classLegend)
     : base(name)
 {
     DoD                   = dod;
     Folder                = folder;
     Mask                  = mask;
     ClassLegend           = classLegend;
     SummaryXML            = summaryXML;
     Classes               = new Dictionary <string, BudgetSegregationClass>();
     MorphologicalAnalyses = new List <Morphological.MorphologicalAnalysis>();
 }
Exemplo n.º 3
0
        public BudgetSegregation(XmlNode nodBS, DoDBase dod)
            : base(nodBS.SelectSingleNode("Name").InnerText)
        {
            DoD         = dod;
            Folder      = ProjectManager.Project.GetAbsoluteDir(nodBS.SelectSingleNode("Folder").InnerText);
            Mask        = ProjectManager.Project.Masks.First(x => x.Name == nodBS.SelectSingleNode("Mask").InnerText) as Masks.AttributeFieldMask;
            SummaryXML  = ProjectManager.Project.GetAbsolutePath(nodBS.SelectSingleNode("SummaryXML").InnerText);
            ClassLegend = ProjectManager.Project.GetAbsolutePath(nodBS.SelectSingleNode("ClassLegend").InnerText);

            Classes = new Dictionary <string, BudgetSegregationClass>();
            foreach (XmlNode nodClass in nodBS.SelectNodes("Classes/Class"))
            {
                BudgetSegregationClass bsClass = new BudgetSegregationClass(nodClass);
                Classes[bsClass.Name] = bsClass;
            }

            MorphologicalAnalyses = new List <Morphological.MorphologicalAnalysis>();
            foreach (XmlNode nodMA in nodBS.SelectNodes("MorphologicalAnalyses/MorphologicalAnalysis"))
            {
                Morphological.MorphologicalAnalysis ma = new Morphological.MorphologicalAnalysis(nodMA, this);
                MorphologicalAnalyses.Add(ma);
            }
        }