Class: Proj::Bounds

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(xmin, ymin, xmax, ymax, name = nil) ⇒ Bounds

Creates a new 2D bounding box.

Parameters:

  • xmin (Float)

    Minimum x value

  • ymin (Float)

    Minimum y value

  • xmax (Float)

    Maximum x value

  • ymax (Float)

    Maximum y value

  • name (String, nil) (defaults to: nil)

    Optional name



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

#nameString? (readonly)

Returns Optional name for this bounds.

Returns:

  • (String, nil)

    Optional name for this bounds



16
17
18
# File 'lib/proj/bounds.rb', line 16

def name
  @name
end

#xmaxFloat (readonly)

Returns Maximum x value (e.g., east longitude).

Returns:

  • (Float)

    Maximum x value (e.g., east longitude)



16
# File 'lib/proj/bounds.rb', line 16

attr_reader :name, :xmin, :ymin, :xmax, :ymax

#xminFloat (readonly)

Returns Minimum x value (e.g., west longitude).

Returns:

  • (Float)

    Minimum x value (e.g., west longitude)



16
# File 'lib/proj/bounds.rb', line 16

attr_reader :name, :xmin, :ymin, :xmax, :ymax

#ymaxObject (readonly)

Returns the value of attribute ymax.



16
# File 'lib/proj/bounds.rb', line 16

attr_reader :name, :xmin, :ymin, :xmax, :ymax

#yminFloat (readonly)

Returns Minimum y value (e.g., south latitude).

Returns:

  • (Float)

    Minimum y value (e.g., south latitude)



16
# File 'lib/proj/bounds.rb', line 16

attr_reader :name, :xmin, :ymin, :xmax, :ymax