Class: WrfLibrary::Entity::GridPoint
- Inherits:
-
Object
- Object
- WrfLibrary::Entity::GridPoint
- Defined in:
- lib/wrf_library/entity/grid_point.rb
Overview
Simple data class that abstracts a grid point with grid indices and the corresponding geographical data
Instance Attribute Summary collapse
-
#grid_coordinates ⇒ Coordinate
readonly
The tupel representing the geographical coordinates.
-
#grid_point ⇒ Coordinate
readonly
The tupel representing the grid point in the grid.
Instance Method Summary collapse
-
#initialize(p_x, p_y, c_x, c_y) ⇒ GridPoint
constructor
initialization.
Constructor Details
#initialize(p_x, p_y, c_x, c_y) ⇒ GridPoint
initialization
19 20 21 22 |
# File 'lib/wrf_library/entity/grid_point.rb', line 19 def initialize(p_x, p_y, c_x, c_y) @grid_point = Coordinate.new(p_x, p_y) @grid_coordinates = Coordinate.new(c_x, c_y) end |
Instance Attribute Details
#grid_coordinates ⇒ Coordinate (readonly)
Returns the tupel representing the geographical coordinates.
12 13 14 |
# File 'lib/wrf_library/entity/grid_point.rb', line 12 def grid_coordinates @grid_coordinates end |
#grid_point ⇒ Coordinate (readonly)
Returns the tupel representing the grid point in the grid.
10 11 12 |
# File 'lib/wrf_library/entity/grid_point.rb', line 10 def grid_point @grid_point end |