Module: GeoWeb

Defined in:
lib/geoweb.rb,
lib/geoweb/map.rb,
lib/geoweb/point.rb,
lib/geoweb/lat_lon.rb,
lib/geoweb/location.rb,
lib/geoweb/coordinate.rb,
lib/geoweb/projection.rb,
lib/geoweb/transformation.rb,
lib/geoweb/projection/base.rb,
lib/geoweb/projection/linear.rb,
lib/geoweb/projection/mercator.rb

Overview

require ‘matrix’ require ‘mathn’ require ‘bigdecimal’ TODO - Procurar Proj4js e Procurar Proj4R(uby)

Defined Under Namespace

Modules: Projection Classes: Coordinate, LatLon, Location, Map, Point, Transformation

Constant Summary collapse

DEG_TO_RAD =
Math::PI / 180.0

Class Method Summary collapse

Class Method Details

.deg_to_rad(location) ⇒ Object



18
19
20
# File 'lib/geoweb.rb', line 18

def deg_to_rad(location)
  location * [DEG_TO_RAD, DEG_TO_RAD, 1]
end

.rad_to_deg(location) ⇒ Object



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

def rad_to_deg(location)
  location / [DEG_TO_RAD, DEG_TO_RAD, 1]
end