Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove transverse Mercator; now in 3.1.0.

  • Loading branch information...
commit 37388598a7fd9865f6ffddeefcad16a5d039b4bb 1 parent 8698a7b
@jasondavies jasondavies authored
View
1  geo/projection/index.js
@@ -51,7 +51,6 @@ import "satellite";
import "sinusoidal";
import "sinu-mollweide";
import "times";
-import "transverse-mercator";
import "two-point-azimuthal";
import "two-point-equidistant";
import "van-der-grinten";
View
29 geo/projection/test/transverse-mercator-test.js
@@ -1,29 +0,0 @@
-var vows = require("vows"),
- assert = require("./assert"),
- load = require("./load");
-
-var suite = vows.describe("d3.geo.transverseMercator");
-
-suite.addBatch({
- "transverseMercator": {
- topic: load("transverse-mercator"),
- "default": {
- topic: function(geo) { return geo.transverseMercator(); },
- "projections and inverse projections": function(transverseMercator) {
- assert.equalInverse(transverseMercator, [ 0, 0], [480, 250]);
- assert.equalInverse(transverseMercator, [ 0, -45], [480, 367.809724]);
- assert.equalInverse(transverseMercator, [ 0, 45], [480, 132.190275]);
- assert.equalInverse(transverseMercator, [-90, 0], [-Infinity, 250]);
- assert.equalInverse(transverseMercator, [ 90, 0], [ Infinity, 250]);
- assert.equalInverse(transverseMercator, [-80, 15], [203.284019, 100.632486]);
- assert.equalInverse(transverseMercator, [ 1, 1], [482.617727, 247.381607]);
- assert.equalInverse(transverseMercator, [ 15, 45], [507.764703, 129.590678]);
- assert.equalInverse(transverseMercator, [ 0, 90], [480, 14.380550]);
- assert.equalInverse(transverseMercator, [ 0, -90], [480, 485.619449]);
- assert.equalInverse(transverseMercator, [180, 0], [480, -221.238898]);
- }
- }
- }
-});
-
-suite.export(module);
View
19 geo/projection/transverse-mercator.js
@@ -1,19 +0,0 @@
-import "projection";
-import "hyperbolic";
-
-function transverseMercator(λ, φ) {
- var B = Math.cos(φ) * Math.sin(λ);
- return [
- .5 * Math.log((1 + B) / (1 - B)),
- Math.atan2(Math.tan(φ), Math.cos(λ))
- ];
-}
-
-transverseMercator.invert = function(x, y) {
- return [
- Math.atan2(sinh(x), Math.cos(y)),
- asin(Math.sin(y) / cosh(x))
- ];
-};
-
-(d3.geo.transverseMercator = function() { return projection(transverseMercator); }).raw = transverseMercator;
Please sign in to comment.
Something went wrong with that request. Please try again.