d3js-plugins-rails 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/certs/bai.pem +15 -15
- data/lib/d3js-plugins-rails/version.rb +2 -2
- data/vendor/assets/javascripts/d3/plugins/geo/projection/README.md +164 -161
- data/vendor/assets/javascripts/d3/plugins/geo/projection/airy.js +55 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/chamberlin.js +116 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/index.js +2 -0
- data/vendor/assets/javascripts/d3/plugins/geo/projection/interrupt.js +40 -3
- data/vendor/assets/javascripts/d3/plugins/geo/projection/test/airy-test.js +25 -0
- data/vendor/assets/javascripts/d3/plugins/geo/tile/README.md +3 -2
- data.tar.gz.sig +0 -0
- metadata +21 -18
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f217248ce8766c0937f9b192d5b2e1403643a975
|
4
|
+
data.tar.gz: 146d881fc3c10bb243691aa6a1f70a346ccd7699
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b71ec29a60a817d3b4a89a5f5b2ed38e248feae57cee6ea850145f9c8f5ea2019663d48553d748a72c3b48b05a1ebfc0cc872f6593584c6eaa7cdc75d5895c2
|
7
|
+
data.tar.gz: 44d31cf1c8218ab18d971cb2063a63efec1db86e6b1dbd94e70a5cbc76bbd1ea45db380195b4d6d540b09a33a5078d9a67770e074844307b3f5d7282e84e4594
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/certs/bai.pem
CHANGED
@@ -1,20 +1,20 @@
|
|
1
1
|
-----BEGIN CERTIFICATE-----
|
2
2
|
MIIDSDCCAjCgAwIBAgIBATANBgkqhkiG9w0BAQUFADA1MQowCAYDVQQDDAF2MRMw
|
3
|
-
|
4
|
-
|
3
|
+
EQYKCZImiZPyLGQBGRYDZ29yMRIwEAYKCZImiZPyLGQBGRYCaW8wHhcNMTMwNTIz
|
4
|
+
MjA0MTI3WhcNMTQwNTIzMjA0MTI3WjA1MQowCAYDVQQDDAF2MRMwEQYKCZImiZPy
|
5
5
|
LGQBGRYDZ29yMRIwEAYKCZImiZPyLGQBGRYCaW8wggEiMA0GCSqGSIb3DQEBAQUA
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
6
|
+
A4IBDwAwggEKAoIBAQCtb8+GfjqcYl6M4IhIGomKsGgWEC4mwTXIq/Yl+jJAdP7s
|
7
|
+
bdV3lWnZybUPKtdHSQIJcxbm8GZspTqSqDgsECI/laTyLj7Srqcbyivf/ov50Tg1
|
8
|
+
CxMtt8STA6wNmY0ljO4SK72Pr8uQwFZIgNHBB9LcvrpmRn/TWDXlcqaq0db6QJKk
|
9
|
+
jGOv74ukiQun+saqthpxwNN6wm0rj1GDulrDuMeeMj/XDgu0piNHhBtsgQ6KrN94
|
10
|
+
cs0XGgwKihL0LdqWiOG9L8tZKeksKk72EcTpvaw1EYUfJ/rAcC8l6SluN2+BDMA0
|
11
|
+
/4LU70O+wTwHcHv2HimtKdlcpS936qOez3lXUD+3AgMBAAGjYzBhMAkGA1UdEwQC
|
12
|
+
MAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBSRvHatldjBIKT5agA2bnkfm4KUxTAT
|
13
13
|
BgNVHREEDDAKgQh2QGdvci5pbzATBgNVHRIEDDAKgQh2QGdvci5pbzANBgkqhkiG
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
14
|
+
9w0BAQUFAAOCAQEAmyGZCL6ISHS6UCkPAie1LZgyc+yS4ckMPtzBJtjODr5kfRTC
|
15
|
+
tLb9W4epJ9Aa2aGkKy/NL8MFS0BwTJmjSfufFDwFZlw0kI9aAvL4Nx9OHWNen9Dm
|
16
|
+
GtEWXXKpB0du12DBjfavJYl0QLcz18M0mtvug634t40H06GussO83uu7wHEvIPBP
|
17
|
+
Z5VMAbKvOmDgaP2I9XxZ2/lDmBKDZkVNqmqYiScw2CWsKxVPx3vhMGprTIz4O8y/
|
18
|
+
JCf887eMZl/8mEIeCLb+gH5sh5yJJpti2HTLnR4Q1QKWR/0T9tASoQPF3kL62n9+
|
19
|
+
m1B90+fEzJsBDQIAsnLPqxjivWbIIfZ7GeGZyA==
|
20
20
|
-----END CERTIFICATE-----
|
@@ -1,219 +1,222 @@
|
|
1
1
|
# Extended Geographic Projections
|
2
2
|
|
3
|
-
|
4
3
|
<table class="highlight">
|
5
4
|
<tr height="146" valign="top">
|
6
|
-
<td>
|
7
|
-
<td
|
8
|
-
<td class="gi">
|
9
|
-
<td>
|
5
|
+
<td>airy<br><a href="http://bl.ocks.org/mbostock/5620807"><img src="https://raw.github.com/gist/5620807/thumbnail.png" width="202"></a></td>
|
6
|
+
<td>aitoff<br><a href="http://bl.ocks.org/mbostock/3682698"><img src="https://raw.github.com/gist/3682698/thumbnail.png" width="202"></a></td>
|
7
|
+
<td class="gi">albers *<br><a href="http://bl.ocks.org/mbostock/3734308"><img src="https://raw.github.com/gist/3734308/thumbnail.png" width="202"></a></td>
|
8
|
+
<td class="gi">albersUsa *<br><a href="http://bl.ocks.org/mbostock/4090848"><img src="https://raw.github.com/gist/4090848/thumbnail.png" width="202"></a></td>
|
10
9
|
</tr>
|
11
10
|
<tr height="146" valign="top">
|
12
|
-
<td>
|
13
|
-
<td
|
14
|
-
<td class="gi">
|
15
|
-
<td>
|
11
|
+
<td>armadillo<br><a href="http://bl.ocks.org/mbostock/4463127"><img src="https://raw.github.com/gist/4463127/thumbnail.png" width="202"></a></td>
|
12
|
+
<td>august<br><a href="http://bl.ocks.org/mbostock/3797581"><img src="https://raw.github.com/gist/3797581/thumbnail.png" width="202"></a></td>
|
13
|
+
<td class="gi">azimuthalEqualArea *<br><a href="http://bl.ocks.org/mbostock/3757101"><img src="https://raw.github.com/gist/3757101/thumbnail.png" width="202"></a></td>
|
14
|
+
<td class="gi">azimuthalEquidistant *<br><a href="http://bl.ocks.org/mbostock/3757110"><img src="https://raw.github.com/gist/3757110/thumbnail.png" width="202"></a></td>
|
16
15
|
</tr>
|
17
16
|
<tr height="146" valign="top">
|
18
|
-
<td>
|
19
|
-
<td>
|
20
|
-
<td>
|
21
|
-
<td>
|
17
|
+
<td>baker<br><a href="http://bl.ocks.org/mbostock/4476279"><img src="https://raw.github.com/gist/4476279/thumbnail.png" width="202"></a></td>
|
18
|
+
<td>berghaus<br><a href="http://bl.ocks.org/mbostock/4463049"><img src="https://raw.github.com/gist/4463049/thumbnail.png" width="202"></a></td>
|
19
|
+
<td>boggs<br><a href="http://bl.ocks.org/mbostock/4481220"><img src="https://raw.github.com/gist/4481220/thumbnail.png" width="202"></a></td>
|
20
|
+
<td>bonne<br><a href="http://bl.ocks.org/mbostock/3734313"><img src="https://raw.github.com/gist/3734313/thumbnail.png" width="202"></a></td>
|
22
21
|
</tr>
|
23
22
|
<tr height="146" valign="top">
|
24
|
-
<td>
|
25
|
-
<td
|
26
|
-
<td
|
27
|
-
<td class="gi">
|
23
|
+
<td>bromley<br><a href="http://bl.ocks.org/mbostock/4487695"><img src="https://raw.github.com/gist/4487695/thumbnail.png" width="202"></a></td>
|
24
|
+
<td>chamberlin<br><a href="http://bl.ocks.org/mbostock/5625053"><img src="https://raw.github.com/gist/5625053/thumbnail.png" width="202"></a></td>
|
25
|
+
<td>collignon<br><a href="http://bl.ocks.org/mbostock/3734316"><img src="https://raw.github.com/gist/3734316/thumbnail.png" width="202"></a></td>
|
26
|
+
<td class="gi">conicEqualArea *<br><a href="http://bl.ocks.org/mbostock/3734308"><img src="https://raw.github.com/gist/3734308/thumbnail.png" width="202"></a></td>
|
28
27
|
</tr>
|
29
28
|
<tr height="146" valign="top">
|
30
|
-
<td>
|
31
|
-
<td>
|
32
|
-
<td>
|
33
|
-
<td>
|
29
|
+
<td class="gi">conicConformal *<br><a href="http://bl.ocks.org/mbostock/3734321"><img src="https://raw.github.com/gist/3734321/thumbnail.png" width="202"></a></td>
|
30
|
+
<td class="gi">conicEquidistant *<br><a href="http://bl.ocks.org/mbostock/3734317"><img src="https://raw.github.com/gist/3734317/thumbnail.png" width="202"></a></td>
|
31
|
+
<td>craig<br><a href="http://bl.ocks.org/mbostock/4459466"><img src="https://raw.github.com/gist/4459466/thumbnail.png" width="202"></a></td>
|
32
|
+
<td>craster<br><a href="http://bl.ocks.org/mbostock/4465118"><img src="https://raw.github.com/gist/4465118/thumbnail.png" width="202"></a></td>
|
34
33
|
</tr>
|
35
34
|
<tr height="146" valign="top">
|
36
|
-
<td>
|
37
|
-
<td>
|
38
|
-
<td>
|
39
|
-
<td>
|
35
|
+
<td>cylindricalEqualArea<br><a href="http://bl.ocks.org/mbostock/3712408"><img src="https://raw.github.com/gist/3712408/thumbnail.png" width="202"></a></td>
|
36
|
+
<td>eckert1<br><a href="http://bl.ocks.org/mbostock/3734322"><img src="https://raw.github.com/gist/3734322/thumbnail.png" width="202"></a></td>
|
37
|
+
<td>eckert2<br><a href="http://bl.ocks.org/mbostock/3734324"><img src="https://raw.github.com/gist/3734324/thumbnail.png" width="202"></a></td>
|
38
|
+
<td>eckert3<br><a href="http://bl.ocks.org/mbostock/3734325"><img src="https://raw.github.com/gist/3734325/thumbnail.png" width="202"></a></td>
|
40
39
|
</tr>
|
41
40
|
<tr height="146" valign="top">
|
42
|
-
<td>
|
43
|
-
<td>
|
44
|
-
<td
|
45
|
-
<td>
|
41
|
+
<td>eckert4<br><a href="http://bl.ocks.org/mbostock/3734327"><img src="https://raw.github.com/gist/3734327/thumbnail.png" width="202"></a></td>
|
42
|
+
<td>eckert5<br><a href="http://bl.ocks.org/mbostock/3734328"><img src="https://raw.github.com/gist/3734328/thumbnail.png" width="202"></a></td>
|
43
|
+
<td>eckert6<br><a href="http://bl.ocks.org/mbostock/3734329"><img src="https://raw.github.com/gist/3734329/thumbnail.png" width="202"></a></td>
|
44
|
+
<td>eisenlohr<br><a href="http://bl.ocks.org/mbostock/3797585"><img src="https://raw.github.com/gist/3797585/thumbnail.png" width="202"></a></td>
|
46
45
|
</tr>
|
47
46
|
<tr height="146" valign="top">
|
48
|
-
<td>
|
49
|
-
<td>
|
50
|
-
<td>
|
51
|
-
<td>
|
47
|
+
<td class="gi">equirectangular *<br><a href="http://bl.ocks.org/mbostock/3757119"><img src="https://raw.github.com/gist/3757119/thumbnail.png" width="202"></a></td>
|
48
|
+
<td>fahey<br><a href="http://bl.ocks.org/mbostock/4731228"><img src="https://raw.github.com/gist/4731228/thumbnail.png" width="202"></a></td>
|
49
|
+
<td>gallStereographic<br><a href="http://bl.ocks.org/mbostock/5234763"><img src="https://raw.github.com/gist/5234763/thumbnail.png" width="202"></a></td>
|
50
|
+
<td>ginzburg4<br><a href="http://bl.ocks.org/mbostock/5288565"><img src="https://raw.github.com/gist/5288565/thumbnail.png" width="202"></a></td>
|
52
51
|
</tr>
|
53
52
|
<tr height="146" valign="top">
|
54
|
-
<td>
|
55
|
-
<td>
|
56
|
-
<td
|
57
|
-
<td>
|
53
|
+
<td>ginzburg5<br><a href="http://bl.ocks.org/mbostock/5288571"><img src="https://raw.github.com/gist/5288571/thumbnail.png" width="202"></a></td>
|
54
|
+
<td>ginzburg6<br><a href="http://bl.ocks.org/mbostock/5288577"><img src="https://raw.github.com/gist/5288577/thumbnail.png" width="202"></a></td>
|
55
|
+
<td>ginzburg8<br><a href="http://bl.ocks.org/mbostock/5288583"><img src="https://raw.github.com/gist/5288583/thumbnail.png" width="202"></a></td>
|
56
|
+
<td>ginzburg9<br><a href="http://bl.ocks.org/mbostock/5288590"><img src="https://raw.github.com/gist/5288590/thumbnail.png" width="202"></a></td>
|
58
57
|
</tr>
|
59
58
|
<tr height="146" valign="top">
|
60
|
-
<td>
|
61
|
-
<td>
|
62
|
-
<td>
|
63
|
-
<td>
|
59
|
+
<td class="gi">gnomonic *<br><a href="http://bl.ocks.org/mbostock/3757349"><img src="https://raw.github.com/gist/3757349/thumbnail.png" width="202"></a></td>
|
60
|
+
<td>gringorten<br><a href="http://bl.ocks.org/mbostock/4362031"><img src="https://raw.github.com/gist/4362031/thumbnail.png" width="202"></a></td>
|
61
|
+
<td>guyou<br><a href="http://bl.ocks.org/mbostock/3763867"><img src="https://raw.github.com/gist/3763867/thumbnail.png" width="202"></a></td>
|
62
|
+
<td>hammer<br><a href="http://bl.ocks.org/mbostock/3712397"><img src="https://raw.github.com/gist/3712397/thumbnail.png" width="202"></a></td>
|
64
63
|
</tr>
|
65
64
|
<tr height="146" valign="top">
|
66
|
-
<td>
|
67
|
-
<td>
|
68
|
-
<td>
|
69
|
-
<td>
|
65
|
+
<td>hammerRetroazimuthal<br><a href="http://bl.ocks.org/mbostock/4459130"><img src="https://raw.github.com/gist/4459130/thumbnail.png" width="202"></a></td>
|
66
|
+
<td>healpix<br><a href="http://bl.ocks.org/mbostock/4463237"><img src="https://raw.github.com/gist/4463237/thumbnail.png" width="202"></a></td>
|
67
|
+
<td>hill<br><a href="http://bl.ocks.org/mbostock/4479513"><img src="https://raw.github.com/gist/4479513/thumbnail.png" width="202"></a></td>
|
68
|
+
<td>homolosine<br><a href="http://bl.ocks.org/mbostock/3734330"><img src="https://raw.github.com/gist/3734330/thumbnail.png" width="202"></a></td>
|
70
69
|
</tr>
|
71
70
|
<tr height="146" valign="top">
|
72
|
-
<td>
|
73
|
-
<td>
|
74
|
-
<td>
|
75
|
-
<td>
|
71
|
+
<td>kavrayskiy7<br><a href="http://bl.ocks.org/mbostock/3710082"><img src="https://raw.github.com/gist/3710082/thumbnail.png" width="202"></a></td>
|
72
|
+
<td>lagrange<br><a href="http://bl.ocks.org/mbostock/3797591"><img src="https://raw.github.com/gist/3797591/thumbnail.png" width="202"></a></td>
|
73
|
+
<td>larrivee<br><a href="http://bl.ocks.org/mbostock/3719042"><img src="https://raw.github.com/gist/3719042/thumbnail.png" width="202"></a></td>
|
74
|
+
<td>laskowski<br><a href="http://bl.ocks.org/mbostock/4489342"><img src="https://raw.github.com/gist/4489342/thumbnail.png" width="202"></a></td>
|
76
75
|
</tr>
|
77
76
|
<tr height="146" valign="top">
|
78
|
-
<td
|
79
|
-
<td>
|
80
|
-
<td>
|
81
|
-
<td>
|
77
|
+
<td>littrow<br><a href="http://bl.ocks.org/mbostock/4459071"><img src="https://raw.github.com/gist/4459071/thumbnail.png" width="202"></a></td>
|
78
|
+
<td>loximuthal<br><a href="http://bl.ocks.org/mbostock/3867220"><img src="https://raw.github.com/gist/3867220/thumbnail.png" width="202"></a></td>
|
79
|
+
<td class="gi">mercator *<br><a href="http://bl.ocks.org/mbostock/3757132"><img src="https://raw.github.com/gist/3757132/thumbnail.png" width="202"></a></td>
|
80
|
+
<td>miller<br><a href="http://bl.ocks.org/mbostock/3734333"><img src="https://raw.github.com/gist/3734333/thumbnail.png" width="202"></a></td>
|
82
81
|
</tr>
|
83
82
|
<tr height="146" valign="top">
|
84
|
-
<td>
|
85
|
-
<td>
|
86
|
-
<td>
|
87
|
-
<td>
|
83
|
+
<td>modifiedStereographic<br><a href="http://www.jasondavies.com/maps/modified-stereographic/"><img src="http://www.jasondavies.com/maps/modified-stereographic/gs50/thumb.d3.png" width="202"></a></td>
|
84
|
+
<td>mollweide<br><a href="http://bl.ocks.org/mbostock/3734336"><img src="https://raw.github.com/gist/3734336/thumbnail.png" width="202"></a></td>
|
85
|
+
<td>mtFlatPolarParabolic<br><a href="http://bl.ocks.org/mbostock/4465130"><img src="https://raw.github.com/gist/4465130/thumbnail.png" width="202"></a></td>
|
86
|
+
<td>mtFlatPolarQuartic<br><a href="http://bl.ocks.org/mbostock/4465137"><img src="https://raw.github.com/gist/4465137/thumbnail.png" width="202"></a></td>
|
88
87
|
</tr>
|
89
88
|
<tr height="146" valign="top">
|
90
|
-
<td>
|
91
|
-
<td
|
92
|
-
<td>
|
93
|
-
<td>
|
89
|
+
<td>mtFlatPolarSinusoidal<br><a href="http://bl.ocks.org/mbostock/4465140"><img src="https://raw.github.com/gist/4465140/thumbnail.png" width="202"></a></td>
|
90
|
+
<td>naturalEarth<br><a href="http://bl.ocks.org/mbostock/4479477"><img src="https://raw.github.com/gist/4479477/thumbnail.png" width="202"></a></td>
|
91
|
+
<td>nellHammer<br><a href="http://bl.ocks.org/mbostock/3734342"><img src="https://raw.github.com/gist/3734342/thumbnail.png" width="202"></a></td>
|
92
|
+
<td class="gi">orthographic *<br><a href="http://bl.ocks.org/mbostock/3757125"><img src="https://raw.github.com/gist/3757125/thumbnail.png" width="202"></a></td>
|
94
93
|
</tr>
|
95
94
|
<tr height="146" valign="top">
|
96
|
-
<td>
|
97
|
-
<td>
|
98
|
-
<td>
|
99
|
-
<td>
|
95
|
+
<td>peirceQuincuncial<br><a href="http://bl.ocks.org/mbostock/4310087"><img src="https://raw.github.com/gist/4310087/thumbnail.png" width="202"></a></td>
|
96
|
+
<td>polyconic<br><a href="http://bl.ocks.org/mbostock/3734343"><img src="https://raw.github.com/gist/3734343/thumbnail.png" width="202"></a></td>
|
97
|
+
<td>polyhedron.butterfly<br><a href="http://bl.ocks.org/mbostock/4458680"><img src="https://raw.github.com/gist/4458680/thumbnail.png" width="202"></a></td>
|
98
|
+
<td>polyhedron.waterman<br><a href="http://bl.ocks.org/mbostock/4458497"><img src="https://raw.github.com/gist/4458497/thumbnail.png" width="202"></a></td>
|
100
99
|
</tr>
|
101
100
|
<tr height="146" valign="top">
|
102
|
-
<td>
|
103
|
-
<td>
|
104
|
-
<td>
|
105
|
-
<td
|
101
|
+
<td>rectangularPolyconic<br><a href="http://bl.ocks.org/mbostock/5230202"><img src="https://raw.github.com/gist/5230202/thumbnail.png" width="202"></a></td>
|
102
|
+
<td>robinson<br><a href="http://bl.ocks.org/mbostock/3710566"><img src="https://raw.github.com/gist/3710566/thumbnail.png" width="202"></a></td>
|
103
|
+
<td>satellite<br><a href="http://bl.ocks.org/mbostock/3790444"><img src="https://raw.github.com/gist/3790444/thumbnail.png" width="202"></a></td>
|
104
|
+
<td>sinuMollweide<br><a href="http://bl.ocks.org/mbostock/4319903"><img src="https://raw.github.com/gist/4319903/thumbnail.png" width="202"></a></td>
|
106
105
|
</tr>
|
107
106
|
<tr height="146" valign="top">
|
108
|
-
<td>
|
109
|
-
<td>
|
110
|
-
<td>
|
111
|
-
<td
|
107
|
+
<td>sinusoidal<br><a href="http://bl.ocks.org/mbostock/3712399"><img src="https://raw.github.com/gist/3712399/thumbnail.png" width="202"></a></td>
|
108
|
+
<td class="gi">stereographic *<br><a href="http://bl.ocks.org/mbostock/3757137"><img src="https://raw.github.com/gist/3757137/thumbnail.png" width="202"></a></td>
|
109
|
+
<td>times<br><a href="http://bl.ocks.org/mbostock/5230564"><img src="https://raw.github.com/gist/5230564/thumbnail.png" width="202"></a></td>
|
110
|
+
<td>twoPointAzimuthal<br><a href="http://www.jasondavies.com/maps/two-point-azimuthal/"><img src="http://www.jasondavies.com/maps/two-point-azimuthal/thumb.d3.png" width="202"></a></td>
|
112
111
|
</tr>
|
113
112
|
<tr height="146" valign="top">
|
114
|
-
<td>
|
115
|
-
<td>
|
116
|
-
<td>
|
117
|
-
<td>
|
113
|
+
<td>twoPointEquidistant<br><a href="http://www.jasondavies.com/maps/two-point-equidistant/"><img src="http://www.jasondavies.com/maps/two-point-equidistant/thumb.d3.png" width="202"></a></td>
|
114
|
+
<td class="gi">transverseMercator *<br><a href="http://bl.ocks.org/mbostock/5126418"><img src="https://raw.github.com/gist/5126418/thumbnail.png" width="202"></a></td>
|
115
|
+
<td>vanDerGrinten<br><a href="http://bl.ocks.org/mbostock/3796831"><img src="https://raw.github.com/gist/3796831/thumbnail.png" width="202"></a></td>
|
116
|
+
<td>vanDerGrinten2<br><a href="http://bl.ocks.org/mbostock/5230571"><img src="https://raw.github.com/gist/5230571/thumbnail.png" width="202"></a></td>
|
118
117
|
</tr>
|
119
118
|
<tr height="146" valign="top">
|
120
|
-
<td>
|
121
|
-
<td>
|
122
|
-
<td>
|
123
|
-
<td>
|
119
|
+
<td>vanDerGrinten3<br><a href="http://bl.ocks.org/mbostock/5230580"><img src="https://raw.github.com/gist/5230580/thumbnail.png" width="202"></a></td>
|
120
|
+
<td>vanDerGrinten4<br><a href="http://bl.ocks.org/mbostock/4489365"><img src="https://raw.github.com/gist/4489365/thumbnail.png" width="202"></a></td>
|
121
|
+
<td>wagner4<br><a href="http://bl.ocks.org/mbostock/4487674"><img src="https://raw.github.com/gist/4487674/thumbnail.png" width="202"></a></td>
|
122
|
+
<td>wagner6<br><a href="http://bl.ocks.org/mbostock/3710148"><img src="https://raw.github.com/gist/3710148/thumbnail.png" width="202"></a></td>
|
124
123
|
</tr>
|
125
124
|
<tr height="146" valign="top">
|
126
|
-
<td>
|
125
|
+
<td>wagner7<br><a href="http://bl.ocks.org/mbostock/4465109"><img src="https://raw.github.com/gist/4465109/thumbnail.png" width="202"></a></td>
|
126
|
+
<td>wiechel<br><a href="http://bl.ocks.org/mbostock/4463155"><img src="https://raw.github.com/gist/4463155/thumbnail.png" width="202"></a></td>
|
127
|
+
<td>winkel3<br><a href="http://bl.ocks.org/mbostock/3682676"><img src="https://raw.github.com/gist/3682676/thumbnail.png" width="202"></a></td>
|
127
128
|
</tr>
|
128
129
|
</table>
|
129
130
|
|
130
131
|
Projections:
|
131
132
|
|
132
|
-
*
|
133
|
-
*
|
134
|
-
*
|
135
|
-
*
|
136
|
-
*
|
137
|
-
*
|
138
|
-
*
|
139
|
-
*
|
140
|
-
*
|
141
|
-
*
|
142
|
-
*
|
143
|
-
*
|
144
|
-
*
|
145
|
-
*
|
146
|
-
*
|
147
|
-
*
|
148
|
-
*
|
149
|
-
*
|
150
|
-
*
|
151
|
-
*
|
152
|
-
*
|
153
|
-
*
|
154
|
-
*
|
155
|
-
*
|
156
|
-
*
|
157
|
-
*
|
158
|
-
*
|
159
|
-
*
|
160
|
-
*
|
161
|
-
*
|
162
|
-
*
|
163
|
-
*
|
164
|
-
*
|
165
|
-
*
|
166
|
-
*
|
167
|
-
*
|
168
|
-
*
|
169
|
-
*
|
170
|
-
*
|
171
|
-
*
|
172
|
-
*
|
173
|
-
*
|
174
|
-
*
|
175
|
-
*
|
176
|
-
*
|
177
|
-
*
|
178
|
-
*
|
179
|
-
*
|
180
|
-
*
|
181
|
-
*
|
182
|
-
*
|
183
|
-
*
|
184
|
-
*
|
185
|
-
*
|
186
|
-
*
|
187
|
-
*
|
188
|
-
*
|
189
|
-
*
|
190
|
-
*
|
191
|
-
*
|
192
|
-
*
|
193
|
-
*
|
194
|
-
*
|
195
|
-
*
|
196
|
-
*
|
197
|
-
*
|
198
|
-
*
|
199
|
-
*
|
200
|
-
*
|
201
|
-
*
|
202
|
-
*
|
203
|
-
*
|
204
|
-
*
|
205
|
-
*
|
206
|
-
*
|
207
|
-
*
|
208
|
-
*
|
133
|
+
* aitoff - [Aitoff](http://bl.ocks.org/mbostock/3682698)
|
134
|
+
* airy - [Airy’s minimum-error azimuthal](http://bl.ocks.org/mbostock/5620807)
|
135
|
+
* albers - [Albers equal-area conic](http://bl.ocks.org/mbostock/3734308)
|
136
|
+
* armadillo - [Armadillo](http://bl.ocks.org/mbostock/4463127)
|
137
|
+
* august - [August conformal](http://bl.ocks.org/mbostock/3797581)
|
138
|
+
* azimuthalEqualArea - [Lambert azimuthal equal-area](http://bl.ocks.org/mbostock/3757101)
|
139
|
+
* azimuthalEquidistant - [azimuthal equidistant](http://bl.ocks.org/mbostock/3757110)
|
140
|
+
* baker - [Baker Dinomic](http://bl.ocks.org/mbostock/4476279)
|
141
|
+
* berghaus - [Berghaus Star](http://bl.ocks.org/mbostock/4463049)
|
142
|
+
* boggs - [Boggs eumorphic](http://bl.ocks.org/mbostock/4481220)
|
143
|
+
* bonne - [Bonne](http://bl.ocks.org/mbostock/3734313)
|
144
|
+
* bromley - [Bromley](http://bl.ocks.org/mbostock/4487695)
|
145
|
+
* chamberlin - [Chamberlin trimetric](http://bl.ocks.org/mbostock/5625053)
|
146
|
+
* collignon - [Collignon](http://bl.ocks.org/mbostock/3734316)
|
147
|
+
* conicConformal - [Lambert conformal conic](http://bl.ocks.org/mbostock/3734321)
|
148
|
+
* conicEquidistant - [conic equidistant](http://bl.ocks.org/mbostock/3734317)
|
149
|
+
* craig - [Craig retroazimuthal](http://bl.ocks.org/mbostock/4459466)
|
150
|
+
* craster - [Craster parabolic](http://bl.ocks.org/mbostock/4465118)
|
151
|
+
* cylindricalEqualArea - [cylindrical equal-area](http://bl.ocks.org/mbostock/3712408), [Gall–Peters](http://bl.ocks.org/mbostock/3946824), [Hobo–Dyer](http://bl.ocks.org/mbostock/4476487), [Tobler world-in-a-square](http://bl.ocks.org/mbostock/4476496)
|
152
|
+
* eckert1 - [Eckert I](http://bl.ocks.org/mbostock/3734322)
|
153
|
+
* eckert2 - [Eckert II](http://bl.ocks.org/mbostock/3734324)
|
154
|
+
* eckert3 - [Eckert III](http://bl.ocks.org/mbostock/3734325)
|
155
|
+
* eckert4 - [Eckert IV](http://bl.ocks.org/mbostock/3734327)
|
156
|
+
* eckert5 - [Eckert V](http://bl.ocks.org/mbostock/3734328)
|
157
|
+
* eckert6 - [Eckert VI](http://bl.ocks.org/mbostock/3734329)
|
158
|
+
* eisenlohr - [Eisenlohr conformal](http://bl.ocks.org/mbostock/3797585)
|
159
|
+
* equirectangular - [Equirectangular (Plate Carrée)](http://bl.ocks.org/mbostock/3757119)
|
160
|
+
* fahey - [Fahey](http://bl.ocks.org/mbostock/4731228)
|
161
|
+
* gallStereographic - [Gall’s stereographic](http://bl.ocks.org/mbostock/5234763)
|
162
|
+
* ginzburg4 - [Ginzburg IV](http://bl.ocks.org/mbostock/5288565)
|
163
|
+
* ginzburg5 - [Ginzburg V](http://bl.ocks.org/mbostock/5288571)
|
164
|
+
* ginzburg6 - [Ginzburg VI](http://bl.ocks.org/mbostock/5288577)
|
165
|
+
* ginzburg8 - [Ginzburg VIII](http://bl.ocks.org/mbostock/5288583)
|
166
|
+
* ginzburg9 - [Ginzburg IX](http://bl.ocks.org/mbostock/5288590)
|
167
|
+
* gnomonic - [gnomonic](http://bl.ocks.org/mbostock/3757349)
|
168
|
+
* gringorten - [Gringorten](http://bl.ocks.org/mbostock/4362031)
|
169
|
+
* guyou - [Guyou hemisphere-in-a-square](http://bl.ocks.org/mbostock/3763867)
|
170
|
+
* hammer - [Hammer](http://bl.ocks.org/mbostock/3712397), [Eckert–Greifendorff](http://bl.ocks.org/mbostock/4496212), [quartic authalic](http://bl.ocks.org/mbostock/4463175), [Briesemeister](http://bl.ocks.org/mbostock/4519926)
|
171
|
+
* hammerRetroazimuthal - [Hammer retroazimuthal](http://bl.ocks.org/mbostock/4459130)
|
172
|
+
* healpix - [HEALPix](http://bl.ocks.org/mbostock/4463237)
|
173
|
+
* hill - [Hill eucyclic](http://bl.ocks.org/mbostock/4479513), [Maurer No. 73](http://bl.ocks.org/mbostock/4479547)
|
174
|
+
* homolosine - [Goode homolosine](http://bl.ocks.org/mbostock/3734330)
|
175
|
+
* kavrayskiy7 - [Kavrayskiy VII](http://bl.ocks.org/mbostock/3710082)
|
176
|
+
* lagrange - [Lagrange conformal](http://bl.ocks.org/mbostock/3797591)
|
177
|
+
* larrivee - [Larrivée](http://bl.ocks.org/mbostock/3719042)
|
178
|
+
* laskowski - [Laskowski tri-optimal](http://bl.ocks.org/mbostock/4489342)
|
179
|
+
* littrow - [Littrow](http://bl.ocks.org/mbostock/4459071)
|
180
|
+
* loximuthal - [loximuthal](http://bl.ocks.org/mbostock/3867220)
|
181
|
+
* mercator - [Mercator](http://bl.ocks.org/mbostock/3757132)
|
182
|
+
* miller - [Miller](http://bl.ocks.org/mbostock/3734333)
|
183
|
+
* modifiedStereographic - [modified stereographic](http://www.jasondavies.com/maps/modified-stereographic/)
|
184
|
+
* mollweide - [Mollweide](http://bl.ocks.org/mbostock/3734336), [Atlantis](http://bl.ocks.org/mbostock/4519975)
|
185
|
+
* mtFlatPolarParabolic - [McBryde–Thomas flat-polar parabolic](http://bl.ocks.org/mbostock/4465130)
|
186
|
+
* mtFlatPolarQuartic - [McBryde–Thomas flat-polar quartic](http://bl.ocks.org/mbostock/4465137)
|
187
|
+
* mtFlatPolarSinusoidal - [McBryde–Thomas flat-polar sinusoidal](http://bl.ocks.org/mbostock/4465140)
|
188
|
+
* naturalEarth - [Natural Earth](http://bl.ocks.org/mbostock/4479477)
|
189
|
+
* nellHammer - [Nell–Hammer](http://bl.ocks.org/mbostock/3734342)
|
190
|
+
* orthographic - [orthographic](http://bl.ocks.org/mbostock/3757125)
|
191
|
+
* peirceQuincuncial - [Pierce quincuncial](http://bl.ocks.org/mbostock/4310087)
|
192
|
+
* polyconic - [polyconic](http://bl.ocks.org/mbostock/3734343)
|
193
|
+
* rectangularPolyconic - [rectangular polyconic](http://bl.ocks.org/mbostock/5230202)
|
194
|
+
* robinson - [Robinson](http://bl.ocks.org/mbostock/3710566)
|
195
|
+
* satellite - [satellite (tilted perpsective)](http://bl.ocks.org/mbostock/3790444)
|
196
|
+
* sinusoidal - [sinusoidal](http://bl.ocks.org/mbostock/3712399)
|
197
|
+
* sinuMollweide - [Sinu-Mollweide](http://bl.ocks.org/mbostock/4319903)
|
198
|
+
* stereographic - [stereographic](http://bl.ocks.org/mbostock/3757137)
|
199
|
+
* times - [Times](http://bl.ocks.org/mbostock/5230564)
|
200
|
+
* transverseMercator - [transverse Mercator](http://bl.ocks.org/mbostock/5126418)
|
201
|
+
* twoPointAzimuthal - [two-point azimuthal](https://www.jasondavies.com/maps/two-point-azimuthal/)
|
202
|
+
* twoPointEquidistant - [two-point equidistant](https://www.jasondavies.com/maps/two-point-equidistant/)
|
203
|
+
* vanDerGrinten - [Van der Grinten](http://bl.ocks.org/mbostock/3796831)
|
204
|
+
* vanDerGrinten2 - [Van der Grinten II](http://bl.ocks.org/mbostock/5230571)
|
205
|
+
* vanDerGrinten3 - [Van der Grinten III](http://bl.ocks.org/mbostock/5230580)
|
206
|
+
* vanDerGrinten4 - [Van der Grinten IV](http://bl.ocks.org/mbostock/4489365)
|
207
|
+
* wagner4 - [Wagner IV, Putniṇš P2´](http://bl.ocks.org/mbostock/4487674)
|
208
|
+
* wagner6 - [Wagner VI](http://bl.ocks.org/mbostock/3710148)
|
209
|
+
* wagner7 - [Wagner VII](http://bl.ocks.org/mbostock/4465109)
|
210
|
+
* wiechel - [Wiechel](http://bl.ocks.org/mbostock/4463155)
|
211
|
+
* winkel3 - [Winkel tripel](http://bl.ocks.org/mbostock/3682676)
|
209
212
|
|
210
213
|
This plugin also provides d3.geo.interrupt, which can be used to create arbitrary interrupted projections from a given raw projection. For example, see [Philbrick’s interrupted Sinu-Mollweide](http://bl.ocks.org/4481520).
|
211
214
|
|
212
215
|
This plugin requires [D3 3.0](https://github.com/mbostock/d3/wiki/Upgrading-to-3.0) or greater. To use the official hosted version, include the projection plugin after including D3:
|
213
216
|
|
214
217
|
```html
|
215
|
-
<script src="http://d3js.org/d3.v3.min.js"></script>
|
216
|
-
<script src="http://d3js.org/d3.geo.projection.v0.min.js"></script>
|
218
|
+
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
|
219
|
+
<script src="http://d3js.org/d3.geo.projection.v0.min.js" charset="utf-8"></script>
|
217
220
|
```
|
218
221
|
|
219
222
|
Alternatively, you can clone this repo, [download the zipball](http://github.com/d3/d3-plugins/zipball/master), or right-click [d3.geo.projection.v0.min.js](http://d3js.org/d3.geo.projection.v0.min.js) and save.
|
@@ -0,0 +1,55 @@
|
|
1
|
+
import "projection";
|
2
|
+
|
3
|
+
function airy(β) {
|
4
|
+
var tanβ_2 = Math.tan(.5 * β),
|
5
|
+
B = 2 * Math.log(Math.cos(.5 * β)) / (tanβ_2 * tanβ_2);
|
6
|
+
|
7
|
+
function forward(λ, φ) {
|
8
|
+
var cosλ = Math.cos(λ),
|
9
|
+
cosφ = Math.cos(φ),
|
10
|
+
sinφ = Math.sin(φ),
|
11
|
+
cosz = cosφ * cosλ,
|
12
|
+
K = -((1 - cosz ? Math.log(.5 * (1 + cosz)) / (1 - cosz) : -.5) + B / (1 + cosz));
|
13
|
+
return [
|
14
|
+
K * cosφ * Math.sin(λ),
|
15
|
+
K * sinφ
|
16
|
+
];
|
17
|
+
}
|
18
|
+
|
19
|
+
forward.invert = function(x, y) {
|
20
|
+
var ρ = Math.sqrt(x * x + y * y),
|
21
|
+
z = β * -.5,
|
22
|
+
i = 50, δ;
|
23
|
+
if (!ρ) return [0, 0];
|
24
|
+
do {
|
25
|
+
var z_2 = .5 * z,
|
26
|
+
cosz_2 = Math.cos(z_2),
|
27
|
+
sinz_2 = Math.sin(z_2),
|
28
|
+
tanz_2 = Math.tan(z_2),
|
29
|
+
lnsecz_2 = Math.log(1 / cosz_2);
|
30
|
+
z -= δ = (2 / tanz_2 * lnsecz_2 - B * tanz_2 - ρ) / (-lnsecz_2 / (sinz_2 * sinz_2) + 1 - B / (2 * cosz_2 * cosz_2));
|
31
|
+
} while (Math.abs(δ) > ε && --i > 0);
|
32
|
+
var sinz = Math.sin(z);
|
33
|
+
return [
|
34
|
+
Math.atan2(x * sinz, ρ * Math.cos(z)),
|
35
|
+
asin(y * sinz / ρ)
|
36
|
+
];
|
37
|
+
};
|
38
|
+
|
39
|
+
return forward;
|
40
|
+
}
|
41
|
+
|
42
|
+
function airyProjection() {
|
43
|
+
var β = π / 2,
|
44
|
+
m = projectionMutator(airy),
|
45
|
+
p = m(β);
|
46
|
+
|
47
|
+
p.radius = function(_) {
|
48
|
+
if (!arguments.length) return β / π * 180;
|
49
|
+
return m(β = _ * π / 180);
|
50
|
+
};
|
51
|
+
|
52
|
+
return p;
|
53
|
+
}
|
54
|
+
|
55
|
+
(d3.geo.airy = airyProjection).raw = airy;
|
@@ -0,0 +1,116 @@
|
|
1
|
+
import "projection";
|
2
|
+
|
3
|
+
function chamberlin(points) {
|
4
|
+
points = points.map(function(p) {
|
5
|
+
return [p[0], p[1], Math.sin(p[1]), Math.cos(p[1])];
|
6
|
+
});
|
7
|
+
|
8
|
+
for (var a = points[2], b, i = 0; i < 3; ++i, a = b) {
|
9
|
+
b = points[i];
|
10
|
+
a.v = chamberlinDistanceAzimuth(b[1] - a[1], a[3], a[2], b[3], b[2], b[0] - a[0]);
|
11
|
+
a.point = [0, 0];
|
12
|
+
}
|
13
|
+
|
14
|
+
var β0 = chamberlinAngle(points[0].v[0], points[2].v[0], points[1].v[0]),
|
15
|
+
β1 = chamberlinAngle(points[0].v[0], points[1].v[0], points[2].v[0]),
|
16
|
+
β2 = π - β0;
|
17
|
+
|
18
|
+
points[2].point[1] = 0;
|
19
|
+
points[0].point[0] = -(points[1].point[0] = .5 * points[0].v[0]);
|
20
|
+
|
21
|
+
var mean = [
|
22
|
+
points[2].point[0] = points[0].point[0] + points[2].v[0] * Math.cos(β0),
|
23
|
+
2 * (points[0].point[1] = points[1].point[1] = points[2].v[0] * Math.sin(β0))
|
24
|
+
];
|
25
|
+
|
26
|
+
function forward(λ, φ) {
|
27
|
+
var sinφ = Math.sin(φ),
|
28
|
+
cosφ = Math.cos(φ),
|
29
|
+
v = new Array(3);
|
30
|
+
|
31
|
+
// Compute distance and azimuth from control points.
|
32
|
+
for (var i = 0; i < 3; ++i) {
|
33
|
+
var p = points[i];
|
34
|
+
v[i] = chamberlinDistanceAzimuth(φ - p[1], p[3], p[2], cosφ, sinφ, λ - p[0]);
|
35
|
+
if (!v[i][0]) return p.point;
|
36
|
+
v[i][1] = chamberlinLongitude(v[i][1] - p.v[1]);
|
37
|
+
}
|
38
|
+
|
39
|
+
// Arithmetic mean of interception points.
|
40
|
+
var point = mean.slice();
|
41
|
+
for (var i = 0; i < 3; ++i) {
|
42
|
+
var j = i == 2 ? 0 : i + 1;
|
43
|
+
var a = chamberlinAngle(points[i].v[0], v[i][0], v[j][0]);
|
44
|
+
if (v[i][1] < 0) a = -a;
|
45
|
+
|
46
|
+
if (!i) {
|
47
|
+
point[0] += v[i][0] * Math.cos(a);
|
48
|
+
point[1] -= v[i][0] * Math.sin(a);
|
49
|
+
} else if (i == 1) {
|
50
|
+
a = β1 - a;
|
51
|
+
point[0] -= v[i][0] * Math.cos(a);
|
52
|
+
point[1] -= v[i][0] * Math.sin(a);
|
53
|
+
} else {
|
54
|
+
a = β2 - a;
|
55
|
+
point[0] += v[i][0] * Math.cos(a);
|
56
|
+
point[1] += v[i][0] * Math.sin(a);
|
57
|
+
}
|
58
|
+
}
|
59
|
+
|
60
|
+
point[0] /= 3, point[1] /= 3;
|
61
|
+
return point;
|
62
|
+
}
|
63
|
+
|
64
|
+
return forward;
|
65
|
+
}
|
66
|
+
|
67
|
+
function chamberlinProjection() {
|
68
|
+
var points = [[0, 0], [0, 0], [0, 0]],
|
69
|
+
m = projectionMutator(chamberlin),
|
70
|
+
p = m(points),
|
71
|
+
rotate = p.rotate;
|
72
|
+
|
73
|
+
delete p.rotate;
|
74
|
+
|
75
|
+
p.points = function(_) {
|
76
|
+
if (!arguments.length) return points;
|
77
|
+
points = _;
|
78
|
+
var origin = d3.geo.centroid({type: "MultiPoint", coordinates: points}),
|
79
|
+
r = [-origin[0], -origin[1]];
|
80
|
+
rotate.call(p, r);
|
81
|
+
return m(points.map(d3.geo.rotation(r)).map(chamberlinRadians));
|
82
|
+
};
|
83
|
+
|
84
|
+
return p.points([[-150, 55], [-35, 55], [-92.5, 10]]);
|
85
|
+
}
|
86
|
+
|
87
|
+
function chamberlinDistanceAzimuth(dφ, c1, s1, c2, s2, dλ) {
|
88
|
+
var cosdλ = Math.cos(dλ),
|
89
|
+
r;
|
90
|
+
if (Math.abs(dφ) > 1 || Math.abs(dλ) > 1) {
|
91
|
+
r = acos(s1 * s2 + c1 * c2 * cosdλ);
|
92
|
+
} else {
|
93
|
+
var sindφ = Math.sin(.5 * dφ), sindλ = Math.sin(.5 * dλ);
|
94
|
+
r = 2 * asin(Math.sqrt(sindφ * sindφ + c1 * c2 * sindλ * sindλ));
|
95
|
+
}
|
96
|
+
if (Math.abs(r) > ε) {
|
97
|
+
return [r, Math.atan2(c2 * Math.sin(dλ), c1 * s2 - s1 * c2 * cosdλ)];
|
98
|
+
}
|
99
|
+
return [0, 0];
|
100
|
+
}
|
101
|
+
|
102
|
+
// Angle opposite a, and contained between sides of lengths b and c.
|
103
|
+
function chamberlinAngle(b, c, a) {
|
104
|
+
return acos(.5 * (b * b + c * c - a * a) / (b * c));
|
105
|
+
}
|
106
|
+
|
107
|
+
// Normalize longitude.
|
108
|
+
function chamberlinLongitude(λ) {
|
109
|
+
return λ - 2 * π * Math.floor((λ + π) / (2 * π));
|
110
|
+
}
|
111
|
+
|
112
|
+
function chamberlinRadians(point) {
|
113
|
+
return [point[0] * radians, point[1] * radians];
|
114
|
+
}
|
115
|
+
|
116
|
+
(d3.geo.chamberlin = chamberlinProjection).raw = chamberlin;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import "start";
|
2
2
|
import "interrupt";
|
3
|
+
import "airy";
|
3
4
|
import "aitoff";
|
4
5
|
import "armadillo";
|
5
6
|
import "august";
|
@@ -8,6 +9,7 @@ import "berghaus";
|
|
8
9
|
import "boggs";
|
9
10
|
import "bonne";
|
10
11
|
import "bromley";
|
12
|
+
import "chamberlin";
|
11
13
|
import "collignon";
|
12
14
|
import "craig";
|
13
15
|
import "craster";
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import "projection";
|
2
|
+
import "math";
|
2
3
|
|
3
4
|
d3.geo.interrupt = function(project) {
|
4
5
|
var lobes = [
|
@@ -6,16 +7,47 @@ d3.geo.interrupt = function(project) {
|
|
6
7
|
[[[-π, 0], [0, -π / 2], [π, 0]]]
|
7
8
|
];
|
8
9
|
|
9
|
-
var
|
10
|
+
var bounds;
|
11
|
+
|
12
|
+
function forward(λ, φ) {
|
10
13
|
var sign = φ < 0 ? -1 : +1,
|
11
14
|
hemilobes = lobes[+(φ < 0)];
|
12
15
|
for (var i = 0, n = hemilobes.length - 1; i < n && λ > hemilobes[i][2][0]; ++i);
|
13
16
|
var coordinates = project(λ - hemilobes[i][1][0], φ);
|
14
17
|
coordinates[0] += project(hemilobes[i][1][0], sign * φ > sign * hemilobes[i][0][1] ? hemilobes[i][0][1] : φ)[0];
|
15
18
|
return coordinates;
|
16
|
-
}
|
19
|
+
}
|
17
20
|
|
18
|
-
|
21
|
+
function reset() {
|
22
|
+
bounds = lobes.map(function(hemilobes) {
|
23
|
+
return hemilobes.map(function(lobe) {
|
24
|
+
var x0 = project(lobe[0][0], lobe[0][1])[0],
|
25
|
+
x1 = project(lobe[2][0], lobe[2][1])[0],
|
26
|
+
y0 = project(lobe[1][0], lobe[0][1])[1],
|
27
|
+
y1 = project(lobe[1][0], lobe[1][1])[1],
|
28
|
+
t;
|
29
|
+
if (y0 > y1) t = y0, y0 = y1, y1 = t;
|
30
|
+
return [[x0, y0], [x1, y1]];
|
31
|
+
});
|
32
|
+
});
|
33
|
+
}
|
34
|
+
|
35
|
+
// Assumes mutually exclusive bounding boxes for lobes.
|
36
|
+
if (project.invert) forward.invert = function(x, y) {
|
37
|
+
var hemibounds = bounds[+(y < 0)],
|
38
|
+
hemilobes = lobes[+(y < 0)];
|
39
|
+
for (var i = 0, n = hemibounds.length; i < n; ++i) {
|
40
|
+
var b = hemibounds[i];
|
41
|
+
if (b[0][0] <= x && x < b[1][0] && b[0][1] <= y && y < b[1][1]) {
|
42
|
+
var coordinates = project.invert(x - project(hemilobes[i][1][0], 0)[0], y);
|
43
|
+
coordinates[0] += hemilobes[i][1][0];
|
44
|
+
return pointEqual(forward(coordinates[0], coordinates[1]), [x, y]) ? coordinates : null;
|
45
|
+
}
|
46
|
+
}
|
47
|
+
};
|
48
|
+
|
49
|
+
var projection = d3.geo.projection(forward),
|
50
|
+
stream_ = projection.stream;
|
19
51
|
|
20
52
|
projection.stream = function(stream) {
|
21
53
|
var rotate = projection.rotate(),
|
@@ -45,6 +77,7 @@ d3.geo.interrupt = function(project) {
|
|
45
77
|
];
|
46
78
|
});
|
47
79
|
});
|
80
|
+
reset();
|
48
81
|
return projection;
|
49
82
|
};
|
50
83
|
|
@@ -109,5 +142,9 @@ d3.geo.interrupt = function(project) {
|
|
109
142
|
return resampled;
|
110
143
|
}
|
111
144
|
|
145
|
+
function pointEqual(a, b) {
|
146
|
+
return Math.abs(a[0] - b[0]) < ε && Math.abs(a[1] - b[1]) < ε;
|
147
|
+
}
|
148
|
+
|
112
149
|
return projection;
|
113
150
|
};
|
@@ -0,0 +1,25 @@
|
|
1
|
+
var vows = require("vows"),
|
2
|
+
assert = require("./assert"),
|
3
|
+
load = require("./load");
|
4
|
+
|
5
|
+
var suite = vows.describe("d3.geo.airy");
|
6
|
+
|
7
|
+
suite.addBatch({
|
8
|
+
"airy": {
|
9
|
+
topic: load("airy"),
|
10
|
+
"default": {
|
11
|
+
topic: function(geo) { return geo.airy(); },
|
12
|
+
"projections and inverse projections": function(airy) {
|
13
|
+
assert.equalInverse(airy, [ 0, 0], [480, 250]);
|
14
|
+
assert.equalInverse(airy, [ 180, -90], [480, 457.944154]);
|
15
|
+
assert.equalInverse(airy, [ 180, 90], [480, 42.055845]);
|
16
|
+
assert.equalInverse(airy, [ 0, -45], [480, 350.409232]);
|
17
|
+
assert.equalInverse(airy, [ 0, 45], [480, 149.590767]);
|
18
|
+
assert.equalInverse(airy, [ 1, 1], [482.216112, 247.783550]);
|
19
|
+
assert.equalInverse(airy, [ 45, 87], [487.496494, 47.708572]);
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
23
|
+
});
|
24
|
+
|
25
|
+
suite.export(module);
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# Zoomable Tiles
|
2
2
|
|
3
|
-
* Panning & Zooming
|
4
|
-
* Clipping
|
3
|
+
* Panning & Zooming: <http://bl.ocks.org/mbostock/4132797>
|
4
|
+
* Clipping: <http://bl.ocks.org/mbostock/4150951>
|
5
|
+
* Vector Tiles: <http://bl.ocks.org/mbostock/5593150>
|
5
6
|
|
6
7
|
A layout for determining which 256x256 quadtree tiles to display in a rectangular viewport, based on a scale and translate. This layout can be used to create a simple slippy map, or render standard map tiles (e.g., MapBox, CloudMade) as a base layer behind a geographic projection.
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: d3js-plugins-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vlad Gorodetsky
|
@@ -11,25 +11,25 @@ cert_chain:
|
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
13
|
MIIDSDCCAjCgAwIBAgIBATANBgkqhkiG9w0BAQUFADA1MQowCAYDVQQDDAF2MRMw
|
14
|
-
|
15
|
-
|
14
|
+
EQYKCZImiZPyLGQBGRYDZ29yMRIwEAYKCZImiZPyLGQBGRYCaW8wHhcNMTMwNTIz
|
15
|
+
MjA0MTI3WhcNMTQwNTIzMjA0MTI3WjA1MQowCAYDVQQDDAF2MRMwEQYKCZImiZPy
|
16
16
|
LGQBGRYDZ29yMRIwEAYKCZImiZPyLGQBGRYCaW8wggEiMA0GCSqGSIb3DQEBAQUA
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
17
|
+
A4IBDwAwggEKAoIBAQCtb8+GfjqcYl6M4IhIGomKsGgWEC4mwTXIq/Yl+jJAdP7s
|
18
|
+
bdV3lWnZybUPKtdHSQIJcxbm8GZspTqSqDgsECI/laTyLj7Srqcbyivf/ov50Tg1
|
19
|
+
CxMtt8STA6wNmY0ljO4SK72Pr8uQwFZIgNHBB9LcvrpmRn/TWDXlcqaq0db6QJKk
|
20
|
+
jGOv74ukiQun+saqthpxwNN6wm0rj1GDulrDuMeeMj/XDgu0piNHhBtsgQ6KrN94
|
21
|
+
cs0XGgwKihL0LdqWiOG9L8tZKeksKk72EcTpvaw1EYUfJ/rAcC8l6SluN2+BDMA0
|
22
|
+
/4LU70O+wTwHcHv2HimtKdlcpS936qOez3lXUD+3AgMBAAGjYzBhMAkGA1UdEwQC
|
23
|
+
MAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBSRvHatldjBIKT5agA2bnkfm4KUxTAT
|
24
24
|
BgNVHREEDDAKgQh2QGdvci5pbzATBgNVHRIEDDAKgQh2QGdvci5pbzANBgkqhkiG
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
25
|
+
9w0BAQUFAAOCAQEAmyGZCL6ISHS6UCkPAie1LZgyc+yS4ckMPtzBJtjODr5kfRTC
|
26
|
+
tLb9W4epJ9Aa2aGkKy/NL8MFS0BwTJmjSfufFDwFZlw0kI9aAvL4Nx9OHWNen9Dm
|
27
|
+
GtEWXXKpB0du12DBjfavJYl0QLcz18M0mtvug634t40H06GussO83uu7wHEvIPBP
|
28
|
+
Z5VMAbKvOmDgaP2I9XxZ2/lDmBKDZkVNqmqYiScw2CWsKxVPx3vhMGprTIz4O8y/
|
29
|
+
JCf887eMZl/8mEIeCLb+gH5sh5yJJpti2HTLnR4Q1QKWR/0T9tASoQPF3kL62n9+
|
30
|
+
m1B90+fEzJsBDQIAsnLPqxjivWbIIfZ7GeGZyA==
|
31
31
|
-----END CERTIFICATE-----
|
32
|
-
date: 2013-
|
32
|
+
date: 2013-05-23 00:00:00.000000000 Z
|
33
33
|
dependencies:
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: railties
|
@@ -83,6 +83,7 @@ files:
|
|
83
83
|
- vendor/assets/javascripts/d3/plugins/geo/polyhedron/README.md
|
84
84
|
- vendor/assets/javascripts/d3/plugins/geo/polyhedron/polyhedron.js
|
85
85
|
- vendor/assets/javascripts/d3/plugins/geo/projection/README.md
|
86
|
+
- vendor/assets/javascripts/d3/plugins/geo/projection/airy.js
|
86
87
|
- vendor/assets/javascripts/d3/plugins/geo/projection/aitoff.js
|
87
88
|
- vendor/assets/javascripts/d3/plugins/geo/projection/armadillo.js
|
88
89
|
- vendor/assets/javascripts/d3/plugins/geo/projection/august.js
|
@@ -91,6 +92,7 @@ files:
|
|
91
92
|
- vendor/assets/javascripts/d3/plugins/geo/projection/boggs.js
|
92
93
|
- vendor/assets/javascripts/d3/plugins/geo/projection/bonne.js
|
93
94
|
- vendor/assets/javascripts/d3/plugins/geo/projection/bromley.js
|
95
|
+
- vendor/assets/javascripts/d3/plugins/geo/projection/chamberlin.js
|
94
96
|
- vendor/assets/javascripts/d3/plugins/geo/projection/collignon.js
|
95
97
|
- vendor/assets/javascripts/d3/plugins/geo/projection/craig.js
|
96
98
|
- vendor/assets/javascripts/d3/plugins/geo/projection/craster.js
|
@@ -150,6 +152,7 @@ files:
|
|
150
152
|
- vendor/assets/javascripts/d3/plugins/geo/projection/sinu-mollweide.js
|
151
153
|
- vendor/assets/javascripts/d3/plugins/geo/projection/sinusoidal.js
|
152
154
|
- vendor/assets/javascripts/d3/plugins/geo/projection/start.js
|
155
|
+
- vendor/assets/javascripts/d3/plugins/geo/projection/test/airy-test.js
|
153
156
|
- vendor/assets/javascripts/d3/plugins/geo/projection/test/aitoff-test.js
|
154
157
|
- vendor/assets/javascripts/d3/plugins/geo/projection/test/armadillo-test.js
|
155
158
|
- vendor/assets/javascripts/d3/plugins/geo/projection/test/assert.js
|
@@ -271,7 +274,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
271
274
|
version: '0'
|
272
275
|
requirements: []
|
273
276
|
rubyforge_project:
|
274
|
-
rubygems_version: 2.0.
|
277
|
+
rubygems_version: 2.0.2
|
275
278
|
signing_key:
|
276
279
|
specification_version: 4
|
277
280
|
summary: Gemified d3js-plugins asset for Rails
|
metadata.gz.sig
CHANGED
Binary file
|