class Geom::LatLong

The LatLong class contains various methods for creating and manipulating latitude and longitude coordinates.

@version SketchUp 6.0

Public Class Methods

new(*args) click to toggle source

The new method creates a LatLong object.

@example

ll = [40.01700, 105.28300]
latlong = Geom::LatLong.new(ll)
if (latlong)
  UI.messagebox(latlong)
else
  UI.messagebox("Failure")
end

@overload initialize

@return [Geom::LatLong]

@overload initialize(latlong)

@param [Geom::LatLong] latlong
@return [Geom::LatLong]

@overload initialize(latlong_array)

@param [Array(Numeric, Numeric)] latlong_array
@return [Geom::LatLong]

@overload initialize(lat, long)

@param [Numeric] lat
@param [Numeric] long
@return [Geom::LatLong]

@version SketchUp 6.0

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

Public Instance Methods

latitude() click to toggle source

The Latitude method retrieves the latitude coordinate from a LatLong object.

@example

ll = [40.01700, 105.28300]
latlong = Geom::LatLong.new(ll)
latitude = latlong.latitude
if (latitude)
  UI.messagebox(latitude)
else
  UI.messagebox("Failure")
end

@return [Float] a latitude coordinate value

@version SketchUp 6.0

# File lib/sketchup-api-stubs/stubs/Geom/LatLong.rb, line 62
def latitude
end
longitude() click to toggle source

The Latitude method retrieves the longitude coordinate from a LatLong object.

@example

ll = [40.01700, 105.28300]
latlong = Geom::LatLong.new(ll)
longitude = latlong.longitude
if (longitude)
  UI.messagebox(longitude)
else
  UI.messagebox("Failure")
end

@return [Float] a latitude coordinate value

@version SketchUp 6.0

# File lib/sketchup-api-stubs/stubs/Geom/LatLong.rb, line 81
def longitude
end
to_a() click to toggle source

The {#to_a} method converts a LatLong object to an array of two values.

@example

latlong = Geom::LatLong.new([40.01700, 105.28300])
array = latlong.to_a

@return [Array(Float, Float)] an array of latitude and longitude

@version SketchUp 6.0

# File lib/sketchup-api-stubs/stubs/Geom/LatLong.rb, line 93
def to_a
end
to_s() click to toggle source

The {#to_s} method converts a LatLong object to a {String}.

@example

latlong = Geom::LatLong.new([40.01700, 105.28300])
string = latlong.to_s

@return [String]

@version SketchUp 6.0

# File lib/sketchup-api-stubs/stubs/Geom/LatLong.rb, line 105
def to_s
end
to_utm() click to toggle source

The to_utm method converts a LatLong object to a UTM object.

@example

ll = [40.01700, 105.28300]
latlong = Geom::LatLong.new(ll)
utm = latlong.to_utm
if (utm)
  UI.messagebox(utm)
else
  UI.messagebox("Failure")
end

@return [Geom::UTM]

@version SketchUp 6.0

# File lib/sketchup-api-stubs/stubs/Geom/LatLong.rb, line 123
def to_utm
end