Sha256: 8e8ae27beafc4691c02b82ae0af9ad45fef959179e4f27d8cd768de2b0b879fc

Contents?: true

Size: 430 Bytes

Versions: 2

Compression:

Stored size: 430 Bytes

Contents

function wiechel(λ, φ) {
  var cosφ = Math.cos(φ),
      sinφ = Math.cos(λ) * cosφ,
      sin1_φ = 1 - sinφ,
      cosλ = Math.cos(λ = Math.atan2(Math.sin(λ) * cosφ, -Math.sin(φ))),
      sinλ = Math.sin(λ);
  cosφ = asqrt(1 - sinφ * sinφ);
  return [
    sinλ * cosφ - cosλ * sin1_φ,
    -cosλ * cosφ - sinλ * sin1_φ
  ];
}

(d3.geo.wiechel = function() { return projection(wiechel); }).raw = wiechel;

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
d3js-plugins-rails-0.0.2 vendor/assets/javascripts/d3/plugins/geo/projection/wiechel.js
d3js-plugins-rails-0.0.1 vendor/assets/javascripts/d3/plugins/geo/projection/wiechel.js