Beispiel #1
0
        public IEnumerable <SpatialRecord> Map(IEnumerable <ISOSpatialRow> isoSpatialRows, List <WorkingData> meters, Dictionary <string, List <ISOProductAllocation> > productAllocations)
        {
            //Compare the first spatial record to product allocations in case there is a mismatch between local time and UTC in comparing dates
            //This value will reflect an offset between the processing computer's timezone settings vs. the actual offset of the data itself,
            //and serves to provide a correction if PANs were reported as UTC.
            //This code will require an exact minute/second match between the first record and one of the PANs to take effect
            ISOSpatialRow firstSpatialRow = isoSpatialRows.First();

            if (productAllocations.Any())
            {
                foreach (ISOProductAllocation pan in productAllocations.First().Value)
                {
                    if (pan.AllocationStamp?.Start != null &&
                        pan.AllocationStamp.Start.Value.Minute == firstSpatialRow.TimeStart.Minute &&
                        pan.AllocationStamp.Start.Value.Second == firstSpatialRow.TimeStart.Second)
                    {
                        _effectiveTimeZoneOffset = (firstSpatialRow.TimeStart - pan.AllocationStamp.Start.Value).TotalHours;
                    }
                }
            }

            _representationValueInterpolator.Clear();

            return(isoSpatialRows.Select(r => Map(r, meters, productAllocations)));
        }
Beispiel #2
0
 public IEnumerable <SpatialRecord> Map(IEnumerable <ISOSpatialRow> isoSpatialRows, List <WorkingData> meters)
 {
     _representationValueInterpolator.Clear();
     return(isoSpatialRows.Select(r => Map(r, meters)));
 }
Beispiel #3
0
 public IEnumerable <SpatialRecord> Map(IEnumerable <ISOSpatialRow> isoSpatialRows, List <WorkingData> meters, Dictionary <string, List <ISOProductAllocation> > productAllocations)
 {
     _representationValueInterpolator.Clear();
     return(isoSpatialRows.Select(r => Map(r, meters, productAllocations)));
 }