Class: Proj::Bounds3d

Inherits:
Object
  • Object
show all
Defined in:
lib/proj/bounds3d.rb

Overview

Represents a 3D bounding box defined by minimum and maximum x/y/z values. Used with CoordinateOperationMixin#transform_bounds_3d to transform 3D regions between coordinate reference systems. Requires PROJ 9.6+.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(xmin, ymin, zmin, xmax, ymax, zmax, name = nil) ⇒ Bounds3d

Creates a new 3D bounding box.

Parameters:

  • xmin (Float)

    Minimum x value

  • ymin (Float)

    Minimum y value

  • zmin (Float)

    Minimum z value

  • xmax (Float)

    Maximum x value

  • ymax (Float)

    Maximum y value

  • zmax (Float)

    Maximum z value

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

    Optional name



35
36
37
38
39
40
41
42
43
# File 'lib/proj/bounds3d.rb', line 35

def initialize(xmin, ymin, zmin, xmax, ymax, zmax, name = nil)
  @xmin = xmin
  @ymin = ymin
  @zmin = zmin
  @xmax = xmax
  @ymax = ymax
  @zmax = zmax
  @name = name
end

Instance Attribute Details

#nameString? (readonly)

Returns Optional name for this bounds.

Returns:

  • (String, nil)

    Optional name for this bounds



22
23
24
# File 'lib/proj/bounds3d.rb', line 22

def name
  @name
end

#xmaxFloat (readonly)

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

Returns:

  • (Float)

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



22
# File 'lib/proj/bounds3d.rb', line 22

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

#xminFloat (readonly)

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

Returns:

  • (Float)

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



22
# File 'lib/proj/bounds3d.rb', line 22

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

#ymaxFloat (readonly)

Returns Maximum y value (e.g., north latitude).

Returns:

  • (Float)

    Maximum y value (e.g., north latitude)



22
# File 'lib/proj/bounds3d.rb', line 22

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

#yminFloat (readonly)

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

Returns:

  • (Float)

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



22
# File 'lib/proj/bounds3d.rb', line 22

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

#zmaxObject (readonly)

Returns the value of attribute zmax.



22
# File 'lib/proj/bounds3d.rb', line 22

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

#zminFloat (readonly)

Returns Minimum z value (e.g., lower elevation).

Returns:

  • (Float)

    Minimum z value (e.g., lower elevation)



22
# File 'lib/proj/bounds3d.rb', line 22

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