Skip to content

Commit 0fc177b

Browse files
committed
add several new projection types to the API
1 parent 57da6f7 commit 0fc177b

File tree

3 files changed

+1914
-249
lines changed

3 files changed

+1914
-249
lines changed

src/plots/geo/constants.js

Lines changed: 40 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,22 @@ exports.projNames = {
2424
'winkel tripel': 'winkel3',
2525
'aitoff': 'aitoff',
2626
'sinusoidal': 'sinusoidal',
27-
/*
28-
// potential projections that could be added to the API
2927

3028
'airy': 'airy',
3129
// 'albers': 'albers',
32-
'armadillo': 'armadillo',
30+
// 'armadillo': 'armadillo',
3331
'august': 'august',
34-
'baker': 'baker',
35-
'berghaus': 'berghaus',
36-
'bertin1953': 'bertin1953',
32+
// 'baker': 'baker',
33+
// 'berghaus': 'berghaus',
34+
// 'bertin1953': 'bertin1953',
3735
'boggs': 'boggs',
38-
'bonne': 'bonne',
39-
'bottomley': 'bottomley',
36+
// 'bonne': 'bonne',
37+
// 'bottomley': 'bottomley',
4038
'bromley': 'bromley',
4139
// 'chamberlin': 'chamberlin',
42-
'chamberlin africa': 'chamberlinAfrica',
40+
// 'chamberlin africa': 'chamberlinAfrica',
4341
'collignon': 'collignon',
44-
'craig': 'craig',
42+
// 'craig': 'craig',
4543
'craster': 'craster',
4644
'cylindrical equal area': 'cylindricalEqualArea',
4745
'cylindrical stereographic': 'cylindricalStereographic',
@@ -55,31 +53,31 @@ exports.projNames = {
5553
'foucaut': 'foucaut',
5654
'foucaut sinusoidal': 'foucautSinusoidal',
5755
'gilbert': 'gilbert',
58-
'gingery': 'gingery',
59-
'ginzburg4': 'ginzburg4',
56+
// 'gingery': 'gingery',
57+
// 'ginzburg4': 'ginzburg4',
6058
'ginzburg5': 'ginzburg5',
6159
'ginzburg6': 'ginzburg6',
6260
'ginzburg8': 'ginzburg8',
6361
'ginzburg9': 'ginzburg9',
6462
'gringorten': 'gringorten',
6563
'guyou': 'guyou',
66-
'hammer retroazimuthal': 'hammerRetroazimuthal',
67-
'healpix': 'healpix',
64+
// 'hammer retroazimuthal': 'hammerRetroazimuthal',
65+
// 'healpix': 'healpix',
6866
'hill': 'hill',
69-
'homolosine': 'homolosine',
67+
// 'homolosine': 'homolosine',
7068
'hufnagel': 'hufnagel',
7169
'hyperelliptical': 'hyperelliptical',
7270
'lagrange': 'lagrange',
73-
'larrivee': 'larrivee',
74-
'laskowski': 'laskowski',
75-
'littrow': 'littrow',
76-
'loximuthal': 'loximuthal',
71+
// 'larrivee': 'larrivee',
72+
// 'laskowski': 'laskowski',
73+
// 'littrow': 'littrow',
74+
// 'loximuthal': 'loximuthal',
7775
// 'modified stereographic': 'modifiedStereographic',
78-
'modified stereographic alaska': 'modifiedStereographicAlaska',
79-
'modified stereographic gs48': 'modifiedStereographicGs48',
80-
'modified stereographic gs50': 'modifiedStereographicGs50',
81-
'modified stereographic miller': 'modifiedStereographicMiller',
82-
'modified stereographic lee': 'modifiedStereographicLee',
76+
// 'modified stereographic alaska': 'modifiedStereographicAlaska',
77+
// 'modified stereographic gs48': 'modifiedStereographicGs48',
78+
// 'modified stereographic gs50': 'modifiedStereographicGs50',
79+
// 'modified stereographic miller': 'modifiedStereographicMiller',
80+
// 'modified stereographic lee': 'modifiedStereographicLee',
8381
'mt flat polar parabolic': 'mtFlatPolarParabolic',
8482
'mt flat polar quartic': 'mtFlatPolarQuartic',
8583
'mt flat polar sinusoidal': 'mtFlatPolarSinusoidal',
@@ -88,10 +86,10 @@ exports.projNames = {
8886
'nell hammer': 'nellHammer',
8987
'nicolosi': 'nicolosi',
9088
'patterson': 'patterson',
91-
'polyconic': 'polyconic',
89+
// 'polyconic': 'polyconic',
9290
'rectangular polyconic': 'rectangularPolyconic',
9391
'satellite': 'satellite',
94-
'sinu mollweide': 'sinuMollweide',
92+
// 'sinu mollweide': 'sinuMollweide',
9593
'times': 'times',
9694
// 'two point azimuthal': 'twoPointAzimuthal',
9795
// 'two point azimuthalUsa': 'twoPointAzimuthalUsa',
@@ -109,21 +107,20 @@ exports.projNames = {
109107
'winkel3': 'winkel3',
110108

111109
// 'interrupt': 'interrupt',
112-
'interrupted homolosine': 'interruptedHomolosine',
113-
'interrupted sinusoidal': 'interruptedSinusoidal',
114-
'interrupted boggs': 'interruptedBoggs',
115-
'interrupted sinu mollweide': 'interruptedSinuMollweide',
116-
'interrupted mollweide': 'interruptedMollweide',
117-
'interrupted mollweide hemispheres': 'interruptedMollweideHemispheres',
118-
'interrupted quartic authalic': 'interruptedQuarticAuthalic',
110+
// 'interrupted homolosine': 'interruptedHomolosine',
111+
// 'interrupted sinusoidal': 'interruptedSinusoidal',
112+
// 'interrupted boggs': 'interruptedBoggs',
113+
// 'interrupted sinu mollweide': 'interruptedSinuMollweide',
114+
// 'interrupted mollweide': 'interruptedMollweide',
115+
// 'interrupted mollweide hemispheres': 'interruptedMollweideHemispheres',
116+
// 'interrupted quartic authalic': 'interruptedQuarticAuthalic',
119117

120-
'polyhedral butterfly': 'polyhedralButterfly',
121-
'polyhedral collignon': 'polyhedralCollignon',
122-
'polyhedral waterman': 'polyhedralWaterman',
118+
// 'polyhedral butterfly': 'polyhedralButterfly',
119+
// 'polyhedral collignon': 'polyhedralCollignon',
120+
// 'polyhedral waterman': 'polyhedralWaterman',
123121

124122
'gringorten quincuncial': 'gringortenQuincuncial',
125123
'peirce quincuncial': 'peirceQuincuncial',
126-
*/
127124
};
128125

129126
var keys = Object.keys(exports.projNames).sort();
@@ -136,7 +133,7 @@ var layout = {
136133
columns: nCol
137134
},
138135
showlegend: false,
139-
width: 650,
136+
width: 1800,
140137
height: 1200,
141138
margin: {
142139
l: 20,
@@ -147,11 +144,12 @@ var layout = {
147144
annotations: [{
148145
showarrow: false,
149146
text: 'fitbounds<br>\'locations\'<br>for all<br>projection<br>types',
150-
font: { size: 24 },
147+
font: { size: 20 },
151148
x: 1,
152149
xref: 'paper',
153150
xanchor: 'right',
154-
y: 0.1,
151+
yref: 'paper',
152+
y: 0,
155153
yanchor: 'bottom'
156154
}],
157155
};
@@ -166,7 +164,7 @@ for(var col = 0; col < nCol; col++) {
166164
var geo = 'geo' + (n ? n + 1 : '');
167165
var usa = name.indexOf('usa') !== -1;
168166
var locationmode = usa ? 'USA-states' : undefined;
169-
var locations = [usa ? 'WA' : 'AUS'];
167+
var locations = usa ? ['WA'] : ['AUS'];
170168

171169
data.push({
172170
name: name,
@@ -211,6 +209,7 @@ exports.axesNames = ['lonaxis', 'lataxis'];
211209

212210
// max longitudinal angular span (EXPERIMENTAL)
213211
exports.lonaxisSpan = {
212+
'satellite': 120,
214213
'orthographic': 180,
215214
'azimuthal equal area': 360,
216215
'azimuthal equidistant': 360,
Loading

0 commit comments

Comments
 (0)