Sha256: cedaee2d4219bcca3bd34553a226119eae490da516a81e132b0d17fb713587dc

Contents?: true

Size: 561 Bytes

Versions: 4

Compression:

Stored size: 561 Bytes

Contents

import "../math/trigonometry";
import "geo";
import "mercator";
import "projection";

function d3_geo_transverseMercator(λ, φ) {
  var B = Math.cos(φ) * Math.sin(λ);
  return [
    Math.log((1 + B) / (1 - B)) / 2,
    Math.atan2(Math.tan(φ), Math.cos(λ))
  ];
}

d3_geo_transverseMercator.invert = function(x, y) {
  return [
    Math.atan2(d3_sinh(x), Math.cos(y)),
    d3_asin(Math.sin(y) / d3_cosh(x))
  ];
};

(d3.geo.transverseMercator = function() {
  return d3_geo_mercatorProjection(d3_geo_transverseMercator);
}).raw = d3_geo_transverseMercator;

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
stripchart-0.0.3 lib/stripchart/public/components/d3/src/geo/transverse-mercator.js
stripmem-0.0.3 lib/stripmem/public/components/d3/src/geo/transverse-mercator.js
stripmem-0.0.2 lib/stripmem/public/components/d3/src/geo/transverse-mercator.js
stripmem-0.0.1 lib/stripmem/public/components/d3/src/geo/transverse-mercator.js