src/AircraftTrajectories/Models/TemporalGrid/GridConverter.cs
/// <summary>
/// Transforms all grids from one metric to the metrics stored in the converter
/// </summary>
/// <returns></returns>
Transforms all grids from one metric to the metrics stored in the converter
Transforms all grids from one metric to the metrics stored in the converter
public TemporalGrid Transform()
        {
            _output = new TemporalGrid();
            _output.Interval = _input.Interval;
            calculationGrid = Grid.CreateEmptyGrid(
                _input.GetGrid(0).Data[0].Length, 
                _input.GetGrid(0).Data.Length, 
                _input.GetGrid(0).LowerLeftCorner,
                _input.GetGrid(0).ReferencePoint,
                _input.GetGrid(0).CellSize
            );
            for (int t=0; t<_input.GetNumberOfGrids(); t++)
            {
                Grid inputGrid = _input.GetGrid(t);
                Grid outputGrid = transformGrid(inputGrid);
                _output.AddGrid(outputGrid);
            }
            return _output;
        }
public TemporalGrid Transform ( ) { _output = new TemporalGrid ( ) ; _output . Interval = _input . Interval ; calculationGrid = Grid . CreateEmptyGrid ( _input . GetGrid ( 0 ) . Data [ 0 ] . Length , _input . GetGrid ( 0 ) . Data . Length , _input . GetGrid ( 0 ) . LowerLeftCorner , _input . GetGrid ( 0 ) . ReferencePoint , _input . GetGrid ( 0 ) . CellSize ) ; for ( int t = 0 ; t < _input . GetNumberOfGrids ( ) ; t ++ ) { Grid inputGrid = _input . GetGrid ( t ) ; Grid outputGrid = transformGrid ( inputGrid ) ; _output . AddGrid ( outputGrid ) ; } return _output ; }
Transforms all grids from one metric to the metrics stored in the converter
Transforms all grids from one metric to the metrics stored in the converter
None