class Geom::UTM

The UTM class lets you work with UTM map coordinates.

@note Valid ranges for {#zone_number} and {#zone_letter} are 1-60 and C-X

(omitting I and O). Valid ranges for {#x} and {#y} are 100000-899999.

@version SketchUp 6.0

Public Class Methods

new(*args) click to toggle source

The {#initialize} method is used to create a new UTM coordinate. You will often create UTM objects by calling the method {Sketchup::Model#point_to_utm} instead of calling this method.

@example

# Create a copy of an existing UTM object.
utm = Geom::UTM.new(utm2)

# Create a new UTM object from scratch.
utm = Geom::UTM.new(13, "T", 475849.37521, 4429682.73749)

@overload initialize(zone_number, zone_letter, x, y)

@param [Integer] zone_number A zone number or a UTM object.
@param [String] zone_letter A zone letter.
@param [Float] x The x position.
@param [Float] y The y position.

@overload initialize(utm)

@param [Geom::UTM] utm A UTM object.

@overload initialize(array)

@param [Array(Integer, String, Float, Float)] An array containing the zone
  number, zone letter, x and y positions.

@return [Geom::UTM]

@version SketchUp 6.0

# File lib/sketchup-api-stubs/stubs/Geom/UTM.rb, line 44
def initialize(*args)
end

Public Instance Methods

to_a() click to toggle source

The {#to_a} method returns a UTM coordinate as a 4 element array. The Array elements are the zone number, the zone letter, the x coordinate and the y coordinate.

@example

# Create a new UTM object from scratch.
utm = Geom::UTM.new(13, "T", 475849.37521, 4429682.73749)
a = utm.to_a

@return [Array(Integer, String, Float, Float)]

@version SketchUp 6.0

# File lib/sketchup-api-stubs/stubs/Geom/UTM.rb, line 59
def to_a
end
to_latlong() click to toggle source

The {#to_latlong} method is used to convert UTM coordinates to latitude and longitude. See the LatLong class for more information.

@example

# Create a new UTM object from scratch.
utm = Geom::UTM.new(13, "T", 475849.37521, 4429682.73749)
ll = utm.to_latlong

@return [Geom::LatLong]

@version SketchUp 6.0

# File lib/sketchup-api-stubs/stubs/Geom/UTM.rb, line 73
def to_latlong
end
to_s() click to toggle source

The {#to_s} method is used to retrieve a string representation of a UTM.

@example

# Create a new UTM object from scratch.
utm = Geom::UTM.new(13, "T", 475849.37521, 4429682.73749)
string = utm.to_s

@return [String]

@version SketchUp 6.0

# File lib/sketchup-api-stubs/stubs/Geom/UTM.rb, line 86
def to_s
end
x() click to toggle source

The {#x} method returns the UTM x coordinate.

@example

# Create a new UTM object from scratch.
utm = Geom::UTM.new(13, "T", 475849.37521, 4429682.73749)
x = utm.x

@return [Float]

@version SketchUp 6.0

# File lib/sketchup-api-stubs/stubs/Geom/UTM.rb, line 99
def x
end
y() click to toggle source

The {#y} method returns the UTM y coordinate.

@example

# Create a new UTM object from scratch.
utm = Geom::UTM.new(13, "T", 475849.37521, 4429682.73749)
y = utm.y

@return [Float]

@version SketchUp 6.0

# File lib/sketchup-api-stubs/stubs/Geom/UTM.rb, line 112
def y
end
zone_letter() click to toggle source

The {#zone_letter} method returns the UTM zone letter.

@example

# Create a new UTM object from scratch.
utm = Geom::UTM.new(13, "T", 475849.37521, 4429682.73749)
zl = utm.zone_letter

@return [String]

@version SketchUp 6.0

# File lib/sketchup-api-stubs/stubs/Geom/UTM.rb, line 125
def zone_letter
end
zone_number() click to toggle source

The {#zone_number} method returns the UTM zone number.

@example

# Create a new UTM object from scratch.
utm = Geom::UTM.new(13, "T", 475849.37521, 4429682.73749)
zn = utm.zone_number

@return [Integer]

@version SketchUp 6.0

# File lib/sketchup-api-stubs/stubs/Geom/UTM.rb, line 138
def zone_number
end