Exemplo n.º 1
0
        public void FillZonalData(Dictionary<string,SpatialZone> currTable)
        {
            string strTok;
            FileReader.ReadLine();
            while ((strTok = FileReader.ReadLine()) != null)
            {
                string[] strToken = strTok.Split(',');
                if (!currTable.ContainsKey(strToken[0]))
                {
                    SpatialZone curZ = new SpatialZone();
                    curZ.SetName(strToken[0]);
                    curZ.SetEPFLName(strToken[1]);
                    //curZ.SetHhldControlTotal(strToken[0],uint.Parse(strToken[2]));
                    curZ.SetAverageIncome(Double.Parse(strToken[2])
                        *Constants.BFRANC_TO_EURO);
                    curZ.SetPercentHighEducated(Double.Parse(strToken[3]));
                    curZ.SetSurfaceOne(double.Parse(strToken[4]));
                    curZ.SetSurfaceOne(double.Parse(strToken[5]));
                    curZ.SetSurfaceOne(double.Parse(strToken[6]));
                    curZ.SetSurfaceOne(double.Parse(strToken[7]));
                    //curZ.SetPercUnitsChosen(Double.Parse(strToken[4]));
                    currTable.Add(strToken[0], curZ);

                }
            }
        }
Exemplo n.º 2
0
 private void CreateSpatialZones()
 {
     using (TextReader myFileReader = new StreamReader(Path.Combine(Constants.DATA_DIR, "PD_hhldType.txt")))
     {
         string strTok;
         myFileReader.ReadLine();
         while ((strTok = myFileReader.ReadLine()) != null)
         {
             string[] strToken = strTok.Split(',');
             SpatialZone currZone = new SpatialZone();
             currZone.SetName(strToken[0]);
             ZonalCollection.Add(strToken[0], currZone);
         }
     }
 }
Exemplo n.º 3
0
        private void CreateSpatialZones()
        {
            SpatialZone currZone = new SpatialZone();
            currZone.SetName("1004");
            ZonalCollection.Add("1004", currZone);

            currZone = new SpatialZone();
            currZone.SetName("1007");
            ZonalCollection.Add("1007", currZone);

            currZone = new SpatialZone();
            currZone.SetName("1018");
            ZonalCollection.Add("1018", currZone);

            currZone = new SpatialZone();
            currZone.SetName("1020");
            ZonalCollection.Add("1020", currZone);
        }