private void SetTimeRange(Common.TimeDomain DataSetTimeDomain)
        {
            //I'm unsure how to do the year...Need to research more
            if (DataSetTimeDomain == Common.TimeDomain.Year)
            {
                //we will need to get the min year and max year from the measurement file

                //probably can optimize later
                var minYear = from gsPoint in _gisDataSet.OrderBy(o => o.timeContainer.Year).Take(1)
                              select gsPoint.timeContainer.Year;


                var maxYear = from gsPoint in _gisDataSet.OrderByDescending(o => o.timeContainer.Year)
                              select gsPoint.timeContainer.Year;

                _dataYear    = minYear.First();
                _dataYearEnd = maxYear.First();

                //check this!!!!!!!
                rangeOfTime = Common.GetEncodedTimesToInterpolate(this.DataSetTimeDomain, this.TimeEncodingFactor, minYear.First(), maxYear.First());

                rangeOfTimeDictionary = Common.GetEncodedTimesToInterpolateForYearDictionary(_dataYear, _dataYearEnd, this.DataSetTimeDomain, this.TimeEncodingFactor);
            }
            else
            {
                rangeOfTime           = Common.GetEncodedTimesToInterpolate(this.DataSetTimeDomain, this.TimeEncodingFactor);
                rangeOfTimeDictionary = Common.GetEncodedTimesToInterpolateDictionary(_dataYear, this.DataSetTimeDomain, this.TimeEncodingFactor);
            }
        }
Esempio n. 2
0
        public TimeDomainContainer(int year, int month, int day)
        {
            Year  = year;
            Month = month;
            Day   = day;

            CurrentTimeDomain = Common.TimeDomain.YearMonthDay;
        }
Esempio n. 3
0
        public TimeDomainContainer(int year, int monthOrQuarter, bool isMonth = false)
        {
            Year = year;

            if (isMonth)
            {
                Month             = monthOrQuarter;
                CurrentTimeDomain = Common.TimeDomain.YearMonth;
            }
            else
            {
                Quarter           = monthOrQuarter;
                CurrentTimeDomain = Common.TimeDomain.YearQuarter;
            }
        }
Esempio n. 4
0
 public TimeDomainContainer(int year)
 {
     Year = year;
     CurrentTimeDomain = Common.TimeDomain.Year;
 }