Class: Proj::Bounds
- Inherits:
-
Object
- Object
- Proj::Bounds
- Defined in:
- lib/proj/bounds.rb
Overview
Represents a 2D bounding box defined by minimum and maximum x/y values. Used with CoordinateOperationMixin#transform_bounds to transform rectangular regions between coordinate reference systems.
Instance Attribute Summary collapse
-
#name ⇒ String?
readonly
Optional name for this bounds.
-
#xmax ⇒ Float
readonly
Maximum x value (e.g., east longitude).
-
#xmin ⇒ Float
readonly
Minimum x value (e.g., west longitude).
-
#ymax ⇒ Object
readonly
Returns the value of attribute ymax.
-
#ymin ⇒ Float
readonly
Minimum y value (e.g., south latitude).
Instance Method Summary collapse
-
#initialize(xmin, ymin, xmax, ymax, name = nil) ⇒ Bounds
constructor
Creates a new 2D bounding box.
Constructor Details
#initialize(xmin, ymin, xmax, ymax, name = nil) ⇒ Bounds
Creates a new 2D bounding box.
27 28 29 30 31 32 33 |
# File 'lib/proj/bounds.rb', line 27 def initialize(xmin, ymin, xmax, ymax, name = nil) @xmin = xmin @ymin = ymin @xmax = xmax @ymax = ymax @name = name end |
Instance Attribute Details
#name ⇒ String? (readonly)
Returns Optional name for this bounds.
16 17 18 |
# File 'lib/proj/bounds.rb', line 16 def name @name end |
#xmax ⇒ Float (readonly)
Returns Maximum x value (e.g., east longitude).
16 |
# File 'lib/proj/bounds.rb', line 16 attr_reader :name, :xmin, :ymin, :xmax, :ymax |
#xmin ⇒ Float (readonly)
Returns Minimum x value (e.g., west longitude).
16 |
# File 'lib/proj/bounds.rb', line 16 attr_reader :name, :xmin, :ymin, :xmax, :ymax |
#ymax ⇒ Object (readonly)
Returns the value of attribute ymax.
16 |
# File 'lib/proj/bounds.rb', line 16 attr_reader :name, :xmin, :ymin, :xmax, :ymax |
#ymin ⇒ Float (readonly)
Returns Minimum y value (e.g., south latitude).
16 |
# File 'lib/proj/bounds.rb', line 16 attr_reader :name, :xmin, :ymin, :xmax, :ymax |