d3js-plugins-rails 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/Gemfile +3 -1
- data/README.md +11 -0
- data/certs/bai.pem +20 -0
- data/d3js-plugins-rails.gemspec +4 -0
- data/lib/d3js-plugins-rails/version.rb +2 -2
- data/vendor/assets/javascripts/d3/plugins/Makefile +10 -87
- data/vendor/assets/javascripts/d3/plugins/geo/projection/README.md +1 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/aitoff.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/armadillo.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/august.js +3 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/baker.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/berghaus.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/boggs.js +2 -1
- data/vendor/assets/javascripts/d3/plugins/geo/projection/bonne.js +3 -2
- data/vendor/assets/javascripts/d3/plugins/geo/projection/bromley.js +2 -1
- data/vendor/assets/javascripts/d3/plugins/geo/projection/collignon.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/conic-conformal.js +2 -1
- data/vendor/assets/javascripts/d3/plugins/geo/projection/conic-equal-area.js +29 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/conic-equidistant.js +2 -1
- data/vendor/assets/javascripts/d3/plugins/geo/projection/craig.js +2 -1
- data/vendor/assets/javascripts/d3/plugins/geo/projection/craster.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/cylindrical-equal-area.js +2 -1
- data/vendor/assets/javascripts/d3/plugins/geo/projection/eckert1.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/eckert2.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/eckert3.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/eckert4.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/eckert5.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/eckert6.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/eisenlohr.js +2 -1
- data/vendor/assets/javascripts/d3/plugins/geo/projection/elliptic.js +3 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/fahey.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/gringorten.js +2 -1
- data/vendor/assets/javascripts/d3/plugins/geo/projection/guyou.js +3 -2
- data/vendor/assets/javascripts/d3/plugins/geo/projection/hammer-retroazimuthal.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/hammer.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/hatano.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/healpix.js +4 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/hill.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/homolosine.js +4 -3
- data/vendor/assets/javascripts/d3/plugins/geo/projection/hyperbolic.js +22 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/index.js +68 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/interrupt.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/kavrayskiy7.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/lagrange.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/larrivee.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/laskowski.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/littrow.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/loximuthal.js +2 -1
- data/vendor/assets/javascripts/d3/plugins/geo/projection/math.js +26 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/miller.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/modified-stereographic.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/mollweide.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/mt-flat-polar-parabolic.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/mt-flat-polar-quartic.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/mt-flat-polar-sinusoidal.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/natural-earth.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/nell-hammer.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/parallel1.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/parallel2.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/peirce-quincuncial.js +3 -2
- data/vendor/assets/javascripts/d3/plugins/geo/projection/polyconic.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/projection.js +1 -47
- data/vendor/assets/javascripts/d3/plugins/geo/projection/quincuncial.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/rectangular-polyconic.js +2 -1
- data/vendor/assets/javascripts/d3/plugins/geo/projection/robinson.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/satellite.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/sinu-mollweide.js +3 -2
- data/vendor/assets/javascripts/d3/plugins/geo/projection/sinusoidal.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/aitoff-test.js +17 -15
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/armadillo-test.js +19 -17
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/{env.js → assert.js} +2 -3
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/august-test.js +18 -16
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/baker-test.js +17 -15
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/berghaus-test.js +17 -15
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/boggs-test.js +17 -15
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/bonne-test.js +9 -9
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/craig-test.js +6 -6
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/craster-test.js +16 -14
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/eisenlohr-test.js +25 -23
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/equirectangular-test.js +2 -3
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/fahey-test.js +16 -14
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/gringorten-test.js +15 -13
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/guyou-test.js +17 -15
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/hammer-retroazimuthal-test.js +6 -6
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/hammer-test.js +5 -5
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/hatano-test.js +16 -14
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/healpix-test.js +15 -13
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/hill-test.js +17 -15
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/lagrange-test.js +6 -6
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/larrivee-test.js +16 -14
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/laskowski-test.js +17 -15
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/littrow-test.js +15 -13
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/load.js +20 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/loximuthal-test.js +16 -14
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/modified-stereographic-test.js +15 -13
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/mollweide-test.js +17 -15
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/mt-flat-polar-parabolic-test.js +16 -14
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/mt-flat-polar-quartic-test.js +16 -14
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/mt-flat-polar-sinusoidal-test.js +16 -14
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/natural-earth-test.js +17 -15
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/peirce-quincuncial-test.js +15 -13
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/polyconic-test.js +17 -15
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/rectangular-polyconic-test.js +6 -6
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/robinson-test.js +17 -15
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/times-test.js +15 -13
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/transverse-mercator-test.js +29 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/two-point-azimuthal-test.js +13 -11
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/two-point-equidistant-test.js +15 -13
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/van-der-grinten2-test.js +15 -13
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/van-der-grinten3-test.js +15 -13
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/van-der-grinten4-test.js +21 -19
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/wagner6-test.js +16 -14
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/wiechel-test.js +15 -13
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/winkel3-test.js +17 -15
- data/vendor/assets/javascripts/d3/plugins/geo/projection/times.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/transverse-mercator.js +19 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/two-point-azimuthal.js +2 -1
- data/vendor/assets/javascripts/d3/plugins/geo/projection/two-point-equidistant.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/van-der-grinten.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/van-der-grinten2.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/van-der-grinten3.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/van-der-grinten4.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/wagner4.js +2 -1
- data/vendor/assets/javascripts/d3/plugins/geo/projection/wagner6.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/wagner7.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/wiechel.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/winkel3.js +2 -1
- data/vendor/assets/javascripts/d3/plugins/hexbin/hexbin.js +9 -4
- data/vendor/assets/javascripts/d3/plugins/package.json +4 -2
- data/vendor/assets/javascripts/d3/plugins/simplify/simplify-test.js +1 -1
- data/vendor/assets/javascripts/d3/plugins/urlencode/urlencode-test.js +1 -1
- metadata +42 -16
- metadata.gz.sig +0 -0
@@ -1,22 +1,24 @@
|
|
1
|
-
require("./env");
|
2
|
-
|
3
1
|
var vows = require("vows"),
|
4
|
-
assert = require("assert")
|
2
|
+
assert = require("./assert"),
|
3
|
+
load = require("./load");
|
5
4
|
|
6
5
|
var suite = vows.describe("d3.geo.gringorten");
|
7
6
|
|
8
7
|
suite.addBatch({
|
9
8
|
"gringorten": {
|
10
|
-
topic:
|
11
|
-
"
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
9
|
+
topic: load("gringorten"),
|
10
|
+
"default": {
|
11
|
+
topic: function(geo) { return geo.gringorten(); },
|
12
|
+
"projections and inverse projections": function(gringorten) {
|
13
|
+
assert.equalInverse(gringorten, [120, 30], [687.902966, 184.525491], 1e-5);
|
14
|
+
assert.equalInverse(gringorten, [ 90, 80], [630, 112.748374]);
|
15
|
+
assert.equalInverse(gringorten, [ 0, 0], [480, 250], 1e-3);
|
16
|
+
assert.equalInverse(gringorten, [-80, 15], [350.494657, 218.619874]);
|
17
|
+
assert.equalInverse(gringorten, [ 0, -45], [480, 399.999928], 1e-3);
|
18
|
+
assert.equalInverse(gringorten, [ 0, 45], [480, 100.000071], 1e-3);
|
19
|
+
assert.equalInverse(gringorten, [ 15, 45], [499.360376, 117.149092], 1e-4);
|
20
|
+
assert.equalInverse(gringorten, [ 1, 1], [481.304784, 246.646234]);
|
21
|
+
}
|
20
22
|
}
|
21
23
|
}
|
22
24
|
});
|
@@ -1,24 +1,26 @@
|
|
1
|
-
require("./env");
|
2
|
-
|
3
1
|
var vows = require("vows"),
|
4
|
-
assert = require("assert")
|
2
|
+
assert = require("./assert"),
|
3
|
+
load = require("./load");
|
5
4
|
|
6
5
|
var suite = vows.describe("d3.geo.guyou");
|
7
6
|
|
8
7
|
suite.addBatch({
|
9
8
|
"guyou": {
|
10
|
-
topic:
|
11
|
-
"
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
9
|
+
topic: load("guyou"),
|
10
|
+
"default": {
|
11
|
+
topic: function(geo) { return geo.guyou(); },
|
12
|
+
"projections and inverse projections": function(guyou) {
|
13
|
+
assert.equalInverse(guyou, [ 0, 0], [480, 250]);
|
14
|
+
assert.equalInverse(guyou, [ 0, -45], [480, 487.382], 1e-3);
|
15
|
+
assert.equalInverse(guyou, [ 0, 45], [480, 12.6172], 1e-4);
|
16
|
+
assert.equalInverse(guyou, [-90, 0], [242.617240, 250]);
|
17
|
+
assert.equalInverse(guyou, [ 90, 0], [717.382759, 250]);
|
18
|
+
assert.equalInverse(guyou, [ 45, 0], [611.625205, 250]);
|
19
|
+
assert.equalInverse(guyou, [-80, 15], [264.628233, 216.032299]);
|
20
|
+
assert.equalInverse(guyou, [ 1, 1], [483.160518, 246.839962]);
|
21
|
+
assert.equalInverse(guyou, [ 15, 45], [561.412842, 86.826667]);
|
22
|
+
assert.equalInverse(guyou, [180, -60], [823.140312, 487.382759], 1e-4);
|
23
|
+
}
|
22
24
|
}
|
23
25
|
}
|
24
26
|
});
|
@@ -1,14 +1,14 @@
|
|
1
|
-
require("./env");
|
2
|
-
|
3
1
|
var vows = require("vows"),
|
4
|
-
assert = require("assert")
|
2
|
+
assert = require("./assert"),
|
3
|
+
load = require("./load");
|
5
4
|
|
6
5
|
var suite = vows.describe("d3.geo.hammerRetroazimuthal");
|
7
6
|
|
8
7
|
suite.addBatch({
|
9
8
|
"hammerRetroazimuthal": {
|
9
|
+
topic: load("hammer-retroazimuthal"),
|
10
10
|
"0° parallel": {
|
11
|
-
topic:
|
11
|
+
topic: function(geo) { return geo.hammerRetroazimuthal(); },
|
12
12
|
"projections and inverse projections": function(hammerRetroazimuthal) {
|
13
13
|
assert.equalInverse(hammerRetroazimuthal, [ 0, 0], [480, 250]);
|
14
14
|
assert.equalInverse(hammerRetroazimuthal, [ 0, -45], [480, 367.809724]);
|
@@ -20,8 +20,8 @@ suite.addBatch({
|
|
20
20
|
}
|
21
21
|
},
|
22
22
|
"30° parallel": {
|
23
|
-
topic: function() {
|
24
|
-
return
|
23
|
+
topic: function(geo) {
|
24
|
+
return geo.hammerRetroazimuthal().parallel(30);
|
25
25
|
},
|
26
26
|
"projections and inverse projections": function(hammerRetroazimuthal) {
|
27
27
|
assert.equalInverse(hammerRetroazimuthal, [ 0, 0], [480, 328.539816]);
|
@@ -1,15 +1,15 @@
|
|
1
|
-
require("./env");
|
2
|
-
|
3
1
|
var vows = require("vows"),
|
4
|
-
assert = require("assert")
|
2
|
+
assert = require("./assert"),
|
3
|
+
load = require("./load");
|
5
4
|
|
6
5
|
var suite = vows.describe("d3.geo.hammer");
|
7
6
|
|
8
7
|
suite.addBatch({
|
9
8
|
"hammer": {
|
9
|
+
topic: load("hammer"),
|
10
10
|
"quarticAuthalic": {
|
11
|
-
topic: function() {
|
12
|
-
return
|
11
|
+
topic: function(geo) {
|
12
|
+
return geo.hammer().coefficient(Infinity);
|
13
13
|
},
|
14
14
|
"projections and inverse projections": function(quarticAuthalic) {
|
15
15
|
assert.equalInverse(quarticAuthalic, [ 0, 0], [480, 250]);
|
@@ -1,23 +1,25 @@
|
|
1
|
-
require("./env");
|
2
|
-
|
3
1
|
var vows = require("vows"),
|
4
|
-
assert = require("assert")
|
2
|
+
assert = require("./assert"),
|
3
|
+
load = require("./load");
|
5
4
|
|
6
5
|
var suite = vows.describe("d3.geo.hatano");
|
7
6
|
|
8
7
|
suite.addBatch({
|
9
8
|
"hatano": {
|
10
|
-
topic:
|
11
|
-
"
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
9
|
+
topic: load("hatano"),
|
10
|
+
"default": {
|
11
|
+
topic: function(geo) { return geo.hatano(); },
|
12
|
+
"projections and inverse projections": function(hatano) {
|
13
|
+
assert.equalInverse(hatano, [ 0, 0], [480, 250]);
|
14
|
+
assert.equalInverse(hatano, [ 0, -90], [480, 441.538303]);
|
15
|
+
assert.equalInverse(hatano, [ 0, 90], [480, 53.383198]);
|
16
|
+
assert.equalInverse(hatano, [ 0, -45], [480, 379.209449]);
|
17
|
+
assert.equalInverse(hatano, [ 0, 45], [480, 119.704758]);
|
18
|
+
assert.equalInverse(hatano, [-180, 0], [ 79.446936, 250]);
|
19
|
+
assert.equalInverse(hatano, [ 180, 0], [880.553063, 250]);
|
20
|
+
assert.equalInverse(hatano, [-179, 15], [87.7505160, 204.093101]);
|
21
|
+
assert.equalInverse(hatano, [ 1, 1], [482.225143, 246.920082]);
|
22
|
+
}
|
21
23
|
}
|
22
24
|
}
|
23
25
|
});
|
@@ -1,22 +1,24 @@
|
|
1
|
-
require("./env");
|
2
|
-
|
3
1
|
var vows = require("vows"),
|
4
|
-
assert = require("assert")
|
2
|
+
assert = require("./assert"),
|
3
|
+
load = require("./load");
|
5
4
|
|
6
5
|
var suite = vows.describe("d3.geo.healpix");
|
7
6
|
|
8
7
|
suite.addBatch({
|
9
8
|
"healpix": {
|
10
|
-
topic:
|
11
|
-
"
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
9
|
+
topic: load("healpix"),
|
10
|
+
"default": {
|
11
|
+
topic: function(geo) { return geo.healpix(); },
|
12
|
+
"projections and inverse projections": function(healpix) {
|
13
|
+
assert.equalInverse(healpix, [ 0, 0], [480, 250]);
|
14
|
+
assert.equalInverse(healpix, [ 1, -45], [487.454782, 356.202278]);
|
15
|
+
assert.equalInverse(healpix, [ 1, 45], [487.454782, 143.797721]);
|
16
|
+
assert.equalInverse(healpix, [-90, 0], [362.190275, 250]);
|
17
|
+
assert.equalInverse(healpix, [ 90, 0], [597.809724, 250]);
|
18
|
+
assert.equalInverse(healpix, [-80, 15], [375.280244, 211.177143]);
|
19
|
+
assert.equalInverse(healpix, [ 1, 1], [481.308996, 247.382139]);
|
20
|
+
assert.equalInverse(healpix, [ 15, 45], [504.813987, 143.797721]);
|
21
|
+
}
|
20
22
|
}
|
21
23
|
}
|
22
24
|
});
|
@@ -1,24 +1,26 @@
|
|
1
|
-
require("./env");
|
2
|
-
|
3
1
|
var vows = require("vows"),
|
4
|
-
assert = require("assert")
|
2
|
+
assert = require("./assert"),
|
3
|
+
load = require("./load");
|
5
4
|
|
6
5
|
var suite = vows.describe("d3.geo.hill");
|
7
6
|
|
8
7
|
suite.addBatch({
|
9
8
|
"hill": {
|
10
|
-
topic:
|
11
|
-
"
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
9
|
+
topic: load("hill"),
|
10
|
+
"default": {
|
11
|
+
topic: function(geo) { return geo.hill(); },
|
12
|
+
"projections and inverse projections": function(hill) {
|
13
|
+
assert.equalInverse(hill, [ 0, 0], [480, 250]);
|
14
|
+
assert.equalInverse(hill, [ 0, -90], [480, 416.823782]);
|
15
|
+
assert.equalInverse(hill, [ 0, 90], [480, 18.873653]);
|
16
|
+
assert.equalInverse(hill, [ 0, -45], [480, 364.499449]);
|
17
|
+
assert.equalInverse(hill, [ 0, 45], [480, 113.253357]);
|
18
|
+
assert.equalInverse(hill, [-180, 0], [122.993559, 59.760268]);
|
19
|
+
assert.equalInverse(hill, [ 180, 0], [837.006440, 59.760268]);
|
20
|
+
assert.equalInverse(hill, [-179, 15], [154.461200, 25.636205]);
|
21
|
+
assert.equalInverse(hill, [ 1, 1], [482.330467, 247.058682]);
|
22
|
+
assert.equalInverse(hill, [ 45, 87], [508.223694, 17.762871]);
|
23
|
+
}
|
22
24
|
}
|
23
25
|
}
|
24
26
|
});
|
@@ -1,14 +1,14 @@
|
|
1
|
-
require("./env");
|
2
|
-
|
3
1
|
var vows = require("vows"),
|
4
|
-
assert = require("assert")
|
2
|
+
assert = require("./assert"),
|
3
|
+
load = require("./load");
|
5
4
|
|
6
5
|
var suite = vows.describe("d3.geo.lagrange");
|
7
6
|
|
8
7
|
suite.addBatch({
|
9
8
|
"lagrange": {
|
9
|
+
topic: load("lagrange"),
|
10
10
|
"spacing(.5)": {
|
11
|
-
topic:
|
11
|
+
topic: function(geo) { return geo.lagrange(); },
|
12
12
|
"projections and inverse projections": function(lagrange) {
|
13
13
|
assert.equalInverse(lagrange, [ 0, 0], [480, 250]);
|
14
14
|
assert.equalInverse(lagrange, [ 0, -45], [480, 315.053600]);
|
@@ -30,8 +30,8 @@ suite.addBatch({
|
|
30
30
|
}
|
31
31
|
},
|
32
32
|
"spacing(.25)": {
|
33
|
-
topic: function() {
|
34
|
-
return
|
33
|
+
topic: function(geo) {
|
34
|
+
return geo.lagrange().spacing(.25);
|
35
35
|
},
|
36
36
|
"projections and inverse projections": function(lagrange) {
|
37
37
|
assert.equalInverse(lagrange, [ 0, 0], [480, 250]);
|
@@ -1,23 +1,25 @@
|
|
1
|
-
require("./env");
|
2
|
-
|
3
1
|
var vows = require("vows"),
|
4
|
-
assert = require("assert")
|
2
|
+
assert = require("./assert"),
|
3
|
+
load = require("./load");
|
5
4
|
|
6
5
|
var suite = vows.describe("d3.geo.larrivee");
|
7
6
|
|
8
7
|
suite.addBatch({
|
9
8
|
"larrivee": {
|
10
|
-
topic:
|
11
|
-
"
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
9
|
+
topic: load("larrivee"),
|
10
|
+
"default": {
|
11
|
+
topic: function(geo) { return geo.larrivee(); },
|
12
|
+
"projections and inverse projections": function(larrivee) {
|
13
|
+
assert.equalInverse(larrivee, [ 0, 0], [480, 250]);
|
14
|
+
assert.equalInverse(larrivee, [ 0, -90], [480, 583.216220]);
|
15
|
+
assert.equalInverse(larrivee, [ 0, 90], [480, -83.216220]);
|
16
|
+
assert.equalInverse(larrivee, [ 0, -45], [480, 377.516326]);
|
17
|
+
assert.equalInverse(larrivee, [ 0, 45], [480, 122.483673]);
|
18
|
+
assert.equalInverse(larrivee, [-180, 0], [ 8.761101, 250]);
|
19
|
+
assert.equalInverse(larrivee, [ 180, 0], [951.238898, 250]);
|
20
|
+
assert.equalInverse(larrivee, [-179, 15], [ 15.405661, 204.340225]);
|
21
|
+
assert.equalInverse(larrivee, [ 1, 1], [482.617894, 247.381895]);
|
22
|
+
}
|
21
23
|
}
|
22
24
|
}
|
23
25
|
});
|
@@ -1,24 +1,26 @@
|
|
1
|
-
require("./env");
|
2
|
-
|
3
1
|
var vows = require("vows"),
|
4
|
-
assert = require("assert")
|
2
|
+
assert = require("./assert"),
|
3
|
+
load = require("./load");
|
5
4
|
|
6
5
|
var suite = vows.describe("d3.geo.laskowski");
|
7
6
|
|
8
7
|
suite.addBatch({
|
9
8
|
"laskowski": {
|
10
|
-
topic:
|
11
|
-
"
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
9
|
+
topic: load("laskowski"),
|
10
|
+
"default": {
|
11
|
+
topic: function(geo) { return geo.laskowski(); },
|
12
|
+
"projections and inverse projections": function(laskowski) {
|
13
|
+
assert.equalInverse(laskowski, [ 0, 0], [480, 250]);
|
14
|
+
assert.equalInverse(laskowski, [ 0, -90], [480, 474.160635]);
|
15
|
+
assert.equalInverse(laskowski, [ 0, 90], [480, 25.839364]);
|
16
|
+
assert.equalInverse(laskowski, [ 0, -45], [480, 373.320127]);
|
17
|
+
assert.equalInverse(laskowski, [ 0, 45], [480, 126.679872]);
|
18
|
+
assert.equalInverse(laskowski, [-180, 0], [ 20.290432, 250]);
|
19
|
+
assert.equalInverse(laskowski, [ 180, 0], [939.709567, 250]);
|
20
|
+
assert.equalInverse(laskowski, [-179, 15], [ 31.276812, 179.551316]);
|
21
|
+
assert.equalInverse(laskowski, [ 1, 1], [482.553846, 247.371809]);
|
22
|
+
assert.equalInverse(laskowski, [ 45, 87], [525.904925, 26.307624]);
|
23
|
+
}
|
22
24
|
}
|
23
25
|
}
|
24
26
|
});
|
@@ -1,22 +1,24 @@
|
|
1
|
-
require("./env");
|
2
|
-
|
3
1
|
var vows = require("vows"),
|
4
|
-
assert = require("assert")
|
2
|
+
assert = require("./assert"),
|
3
|
+
load = require("./load");
|
5
4
|
|
6
5
|
var suite = vows.describe("d3.geo.littrow");
|
7
6
|
|
8
7
|
suite.addBatch({
|
9
8
|
"littrow": {
|
10
|
-
topic:
|
11
|
-
"
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
9
|
+
topic: load("littrow"),
|
10
|
+
"default": {
|
11
|
+
topic: function(geo) { return geo.littrow(); },
|
12
|
+
"projections and inverse projections": function(littrow) {
|
13
|
+
assert.equalInverse(littrow, [ 0, 0], [480, 250]);
|
14
|
+
assert.equalInverse(littrow, [ 0, -45], [480, 400]);
|
15
|
+
assert.equalInverse(littrow, [ 0, 45], [480, 100]);
|
16
|
+
assert.equalInverse(littrow, [-90, 0], [330, 250]);
|
17
|
+
assert.equalInverse(littrow, [ 90, 0], [630, 250]);
|
18
|
+
assert.equalInverse(littrow, [-80, 15], [327.067798, 243.020666]);
|
19
|
+
assert.equalInverse(littrow, [ 1, 1], [482.618259, 247.382139]);
|
20
|
+
assert.equalInverse(littrow, [ 15, 45], [534.903810, 105.111126]);
|
21
|
+
}
|
20
22
|
}
|
21
23
|
}
|
22
24
|
});
|
@@ -0,0 +1,20 @@
|
|
1
|
+
var smash = require("smash"),
|
2
|
+
d3 = require("d3");
|
3
|
+
|
4
|
+
module.exports = function() {
|
5
|
+
var files = [].slice.call(arguments).map(function(d) { return "geo/projection/" + d; }),
|
6
|
+
sandbox = {d3: d3};
|
7
|
+
files.unshift("geo/projection/start");
|
8
|
+
files.push("geo/projection/end");
|
9
|
+
|
10
|
+
function topic() {
|
11
|
+
smash.load(files, "d3.geo", sandbox, this.callback);
|
12
|
+
}
|
13
|
+
|
14
|
+
topic.sandbox = function(_) {
|
15
|
+
sandbox = _;
|
16
|
+
return topic;
|
17
|
+
};
|
18
|
+
|
19
|
+
return topic;
|
20
|
+
};
|
@@ -1,23 +1,25 @@
|
|
1
|
-
require("./env");
|
2
|
-
|
3
1
|
var vows = require("vows"),
|
4
|
-
assert = require("assert")
|
2
|
+
assert = require("./assert"),
|
3
|
+
load = require("./load");
|
5
4
|
|
6
5
|
var suite = vows.describe("d3.geo.loximuthal");
|
7
6
|
|
8
7
|
suite.addBatch({
|
9
8
|
"loximuthal": {
|
10
|
-
topic:
|
11
|
-
"
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
9
|
+
topic: load("loximuthal"),
|
10
|
+
"default": {
|
11
|
+
topic: function(geo) { return geo.loximuthal(); },
|
12
|
+
"projections and inverse projections": function(loximuthal) {
|
13
|
+
assert.equalInverse(loximuthal, [ 0, 0], [480, 250]);
|
14
|
+
assert.equalInverse(loximuthal, [ 0, -90], [480, 485.619449]);
|
15
|
+
assert.equalInverse(loximuthal, [ 0, 90], [480, 14.380550]);
|
16
|
+
assert.equalInverse(loximuthal, [ 0, -45], [480, 367.809724]);
|
17
|
+
assert.equalInverse(loximuthal, [ 0, 45], [480, 132.190275]);
|
18
|
+
assert.equalInverse(loximuthal, [-180, 0], [ 48.773559, 250]);
|
19
|
+
assert.equalInverse(loximuthal, [ 180, 0], [911.226440, 250]);
|
20
|
+
assert.equalInverse(loximuthal, [-179, 15], [ 69.464314, 210.730091]);
|
21
|
+
assert.equalInverse(loximuthal, [ 1, 1], [482.390500, 247.382006]);
|
22
|
+
}
|
21
23
|
}
|
22
24
|
}
|
23
25
|
});
|