コード例 #1
0
    public override void ReadConfiguration(System.Xml.Linq.XElement Configuration)
    {
      base.ReadConfiguration(Configuration);
      //Needs the source model name even if it does not update for the reduction map
      SourceModelName = (Configuration.SafeParseString("SourceModelName") ?? "").ToLower();

      if (Update)
      {
        ShapeFile = new SafeFile() { FileName = Configuration.SafeParseString("ShapeFileName") };
        ShapeFile.ColumnNames.Add(Configuration.SafeParseString("IDColumn"));
        ShapeFile.ColumnNames.Add(Configuration.SafeParseString("ValueColumn"));
      }
    }
コード例 #2
0
    public override void ReadConfiguration(System.Xml.Linq.XElement Configuration)
    {
      base.ReadConfiguration(Configuration);

      if (Include)
      {
        var pFiles = Configuration.Element("ParticleFiles");
        UseUnsatFilter = pFiles.SafeParseBool("RemoveUnsatParticles") ?? false;
        DrainToBoundaryOption = pFiles.SafeParseBool("DrainToBoundaryCorrection") ?? false;

        ParticlesPrSquareMeter = Configuration.SafeParseDouble("ParticlesPrSquareMeter") ?? -1;

        foreach (var parfile in pFiles.Elements("ParticleFile"))
        {
          ParticleFiles.Add(new SafeFile() { FileName = parfile.SafeParseString("ShapeFileName") });
        }

        Start = new DateTime(Configuration.SafeParseInt("FromYear") ?? 2000, Configuration.SafeParseInt("FromMonth") ?? 1, 1);
        End = new DateTime(Configuration.SafeParseInt("ToYear") ?? 2002, Configuration.SafeParseInt("ToMonth") ?? 1, 1);

        OutputFile = new SafeFile() { CheckIfFileExists = false, FileName = Configuration.SafeParseString("ShapeFileName") };
      }
    }