proj4rb 3.0.0 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +26 -15
- data/README.rdoc +82 -44
- data/Rakefile +27 -27
- data/lib/api/api.rb +96 -118
- data/lib/api/api_5_0.rb +331 -300
- data/lib/api/api_5_1.rb +6 -6
- data/lib/api/api_5_2.rb +4 -4
- data/lib/api/api_6_0.rb +116 -14
- data/lib/api/api_6_1.rb +4 -4
- data/lib/api/api_6_2.rb +9 -6
- data/lib/api/api_6_3.rb +6 -0
- data/lib/api/api_7_0.rb +68 -0
- data/lib/api/api_7_1.rb +73 -0
- data/lib/api/api_7_2.rb +14 -0
- data/lib/api/api_8_0.rb +6 -0
- data/lib/api/api_8_1.rb +24 -0
- data/lib/api/api_8_2.rb +6 -0
- data/lib/api/api_9_1.rb +7 -0
- data/lib/api/api_9_2.rb +9 -0
- data/lib/api/api_experimental.rb +196 -0
- data/lib/proj/area.rb +73 -32
- data/lib/proj/axis_info.rb +44 -0
- data/lib/proj/bounds.rb +13 -0
- data/lib/proj/context.rb +174 -28
- data/lib/proj/conversion.rb +92 -0
- data/lib/proj/coordinate.rb +281 -197
- data/lib/proj/coordinate_operation_mixin.rb +381 -0
- data/lib/proj/coordinate_system.rb +137 -0
- data/lib/proj/crs.rb +672 -204
- data/lib/proj/crs_info.rb +47 -0
- data/lib/proj/database.rb +305 -0
- data/lib/proj/datum.rb +32 -0
- data/lib/proj/datum_ensemble.rb +34 -0
- data/lib/proj/ellipsoid.rb +77 -41
- data/lib/proj/error.rb +62 -9
- data/lib/proj/file_api.rb +166 -0
- data/lib/proj/grid.rb +121 -0
- data/lib/proj/grid_cache.rb +64 -0
- data/lib/proj/grid_info.rb +19 -0
- data/lib/proj/network_api.rb +92 -0
- data/lib/proj/operation.rb +42 -42
- data/lib/proj/operation_factory_context.rb +136 -0
- data/lib/proj/parameter.rb +38 -0
- data/lib/proj/parameters.rb +106 -0
- data/lib/proj/pj_object.rb +670 -80
- data/lib/proj/pj_objects.rb +44 -0
- data/lib/proj/prime_meridian.rb +65 -39
- data/lib/proj/projection.rb +698 -207
- data/lib/proj/session.rb +46 -0
- data/lib/proj/strings.rb +32 -0
- data/lib/proj/transformation.rb +101 -60
- data/lib/proj/unit.rb +108 -53
- data/lib/proj.rb +110 -9
- data/proj4rb.gemspec +5 -5
- data/test/abstract_test.rb +23 -1
- data/test/context_test.rb +172 -82
- data/test/conversion_test.rb +368 -0
- data/test/coordinate_system_test.rb +144 -0
- data/test/crs_test.rb +770 -71
- data/test/database_test.rb +360 -0
- data/test/datum_ensemble_test.rb +65 -0
- data/test/datum_test.rb +55 -0
- data/test/ellipsoid_test.rb +64 -18
- data/test/file_api_test.rb +66 -0
- data/test/grid_cache_test.rb +72 -0
- data/test/grid_test.rb +141 -0
- data/test/network_api_test.rb +45 -0
- data/test/operation_factory_context_test.rb +201 -0
- data/test/parameters_test.rb +40 -0
- data/test/pj_object_test.rb +179 -0
- data/test/prime_meridian_test.rb +76 -0
- data/test/proj_test.rb +46 -4
- data/test/projection_test.rb +646 -222
- data/test/session_test.rb +78 -0
- data/test/transformation_test.rb +149 -7
- data/test/unit_test.rb +57 -28
- metadata +51 -13
- data/lib/api/api_4_9.rb +0 -31
- data/lib/proj/config.rb +0 -70
- data/lib/proj/point.rb +0 -72
- data/test/prime_meridians_test.rb +0 -33
data/test/projection_test.rb
CHANGED
@@ -2,225 +2,649 @@
|
|
2
2
|
|
3
3
|
require_relative './abstract_test'
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
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
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
5
|
+
class ProjectionTest < AbstractTest
|
6
|
+
def test_utm
|
7
|
+
context = Proj::Context.new
|
8
|
+
proj = Proj::Projection.utm(context, zone: 1, north: 0)
|
9
|
+
assert(proj)
|
10
|
+
end
|
11
|
+
|
12
|
+
def test_transverse_mercator
|
13
|
+
context = Proj::Context.new
|
14
|
+
proj = Proj::Projection.transverse_mercator(context, center_lat: 0, center_long: 0,
|
15
|
+
scale: 0, false_easting: 0, false_northing: 0,
|
16
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
17
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
18
|
+
assert(proj)
|
19
|
+
end
|
20
|
+
|
21
|
+
def test_gauss_schreiber_transverse_mercator
|
22
|
+
context = Proj::Context.new
|
23
|
+
proj = Proj::Projection.gauss_schreiber_transverse_mercator(context, center_lat: 0, center_long: 0,
|
24
|
+
scale: 0, false_easting: 0, false_northing: 0,
|
25
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
26
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
27
|
+
assert(proj)
|
28
|
+
end
|
29
|
+
|
30
|
+
def test_transverse_mercator_south_oriented
|
31
|
+
context = Proj::Context.new
|
32
|
+
proj = Proj::Projection.transverse_mercator_south_oriented(context, center_lat: 0, center_long: 0,
|
33
|
+
scale: 0, false_easting: 0, false_northing: 0,
|
34
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
35
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
36
|
+
assert(proj)
|
37
|
+
end
|
38
|
+
|
39
|
+
def test_two_point_equidistant
|
40
|
+
context = Proj::Context.new
|
41
|
+
|
42
|
+
proj = Proj::Projection.two_point_equidistant(context,
|
43
|
+
latitude_first_point: 0, longitude_first_point: 0,
|
44
|
+
latitude_second_point: 0, longitude_secon_point: 0,
|
45
|
+
false_easting: 0, false_northing: 0,
|
46
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
47
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
48
|
+
assert(proj)
|
49
|
+
end
|
50
|
+
|
51
|
+
def test_tunisia_mining_grid
|
52
|
+
skip "This test only work on Proj 9.2 and up"
|
53
|
+
context = Proj::Context.new
|
54
|
+
proj = Proj::Projection.tunisia_mining_grid(context, center_lat: 0, center_long: 0,
|
55
|
+
false_easting: 0, false_northing: 0,
|
56
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
57
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
58
|
+
assert(proj)
|
59
|
+
end
|
60
|
+
|
61
|
+
def test_albers_equal_area
|
62
|
+
context = Proj::Context.new
|
63
|
+
|
64
|
+
proj = Proj::Projection.albers_equal_area(context, latitude_false_origin: 0, longitude_false_origin: 0,
|
65
|
+
latitude_first_parallel: 0, latitude_second_parallel: 0,
|
66
|
+
easting_false_origin: 0, northing_false_origin: 0,
|
67
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
68
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
69
|
+
assert(proj)
|
70
|
+
end
|
71
|
+
|
72
|
+
def test_lambert_conic_conformal_1sp
|
73
|
+
context = Proj::Context.new
|
74
|
+
proj = Proj::Projection.lambert_conic_conformal_1sp(context, center_lat: 0, center_long: 0, scale: 0,
|
75
|
+
false_easting: 0, false_northing: 0,
|
76
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
77
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
78
|
+
assert(proj)
|
79
|
+
end
|
80
|
+
|
81
|
+
def test_lambert_conic_conformal_2sp
|
82
|
+
context = Proj::Context.new
|
83
|
+
proj = Proj::Projection.lambert_conic_conformal_2sp(context, latitude_false_origin: 0, longitude_false_origin: 0,
|
84
|
+
latitude_first_parallel: 0, latitude_second_parallel: 0,
|
85
|
+
easting_false_origin: 0, northing_false_origin: 0,
|
86
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
87
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
88
|
+
assert(proj)
|
89
|
+
end
|
90
|
+
|
91
|
+
def test_lambert_conic_conformal_2sp_michigan
|
92
|
+
context = Proj::Context.new
|
93
|
+
proj = Proj::Projection.lambert_conic_conformal_2sp_michigan(context, latitude_false_origin: 0, longitude_false_origin: 0,
|
94
|
+
latitude_first_parallel: 0, latitude_second_parallel: 0,
|
95
|
+
easting_false_origin: 0, northing_false_origin: 0,
|
96
|
+
ellipsoid_scaling_factor: 0,
|
97
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
98
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
99
|
+
assert(proj)
|
100
|
+
end
|
101
|
+
|
102
|
+
def test_lambert_conic_conformal_2sp_belgium
|
103
|
+
context = Proj::Context.new
|
104
|
+
proj = Proj::Projection.lambert_conic_conformal_2sp_belgium(context, latitude_false_origin: 0, longitude_false_origin: 0,
|
105
|
+
latitude_first_parallel: 0, latitude_second_parallel: 0,
|
106
|
+
easting_false_origin: 0, northing_false_origin: 0,
|
107
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
108
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
109
|
+
assert(proj)
|
110
|
+
end
|
111
|
+
|
112
|
+
def test_azimuthal_equidistant
|
113
|
+
context = Proj::Context.new
|
114
|
+
proj = Proj::Projection.azimuthal_equidistant(context, latitude_nat_origin: 0, longitude_nat_origin: 0,
|
115
|
+
false_easting: 0, false_northing: 0,
|
116
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
117
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
118
|
+
|
119
|
+
assert(proj)
|
120
|
+
end
|
121
|
+
|
122
|
+
def test_guam_projection
|
123
|
+
context = Proj::Context.new
|
124
|
+
proj = Proj::Projection.guam_projection(context, latitude_nat_origin: 0, longitude_nat_origin: 0,
|
125
|
+
false_easting: 0, false_northing: 0,
|
126
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
127
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
128
|
+
assert(proj)
|
129
|
+
end
|
130
|
+
|
131
|
+
def test_bonne
|
132
|
+
context = Proj::Context.new
|
133
|
+
proj = Proj::Projection.bonne(context, latitude_nat_origin: 0, longitude_nat_origin: 0,
|
134
|
+
false_easting: 0, false_northing: 0,
|
135
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
136
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
137
|
+
assert(proj)
|
138
|
+
end
|
139
|
+
|
140
|
+
def test_lambert_cylindrical_equal_area_spherical
|
141
|
+
context = Proj::Context.new
|
142
|
+
proj = Proj::Projection.lambert_cylindrical_equal_area_spherical(context, latitude_first_parallel: 0, longitude_nat_origin: 0,
|
143
|
+
false_easting: 0, false_northing: 0,
|
144
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
145
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
146
|
+
|
147
|
+
assert(proj)
|
148
|
+
end
|
149
|
+
|
150
|
+
def test_lambert_cylindrical_equal_area
|
151
|
+
context = Proj::Context.new
|
152
|
+
proj = Proj::Projection.lambert_cylindrical_equal_area(context, latitude_first_parallel: 0, longitude_nat_origin: 0,
|
153
|
+
false_easting: 0, false_northing: 0,
|
154
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
155
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
156
|
+
assert(proj)
|
157
|
+
end
|
158
|
+
|
159
|
+
def test_cassini_soldner
|
160
|
+
context = Proj::Context.new
|
161
|
+
proj = Proj::Projection.cassini_soldner(context, center_lat: 0, center_long: 0,
|
162
|
+
false_easting: 0, false_northing: 0,
|
163
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
164
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
165
|
+
assert(proj)
|
166
|
+
end
|
167
|
+
|
168
|
+
def test_equidistant_conic
|
169
|
+
context = Proj::Context.new
|
170
|
+
proj = Proj::Projection.equidistant_conic(context, center_lat: 0, center_long: 0,
|
171
|
+
latitude_first_parallel: 0, latitude_second_parallel: 0,
|
172
|
+
false_easting: 0, false_northing: 0,
|
173
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
174
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
175
|
+
assert(proj)
|
176
|
+
end
|
177
|
+
|
178
|
+
def test_eckert_i
|
179
|
+
context = Proj::Context.new
|
180
|
+
proj = Proj::Projection.eckert_i(context, center_long: 0,
|
181
|
+
false_easting: 0, false_northing: 0,
|
182
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
183
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
184
|
+
assert(proj)
|
185
|
+
end
|
186
|
+
|
187
|
+
def test_eckert_ii
|
188
|
+
context = Proj::Context.new
|
189
|
+
proj = Proj::Projection.eckert_ii(context, center_long: 0,
|
190
|
+
false_easting: 0, false_northing: 0,
|
191
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
192
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
193
|
+
assert(proj)
|
194
|
+
end
|
195
|
+
|
196
|
+
def test_eckert_iii
|
197
|
+
context = Proj::Context.new
|
198
|
+
proj = Proj::Projection.eckert_iii(context, center_long: 0,
|
199
|
+
false_easting: 0, false_northing: 0,
|
200
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
201
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
202
|
+
assert(proj)
|
203
|
+
end
|
204
|
+
|
205
|
+
def test_eckert_iv
|
206
|
+
context = Proj::Context.new
|
207
|
+
proj = Proj::Projection.eckert_iv(context, center_long: 0,
|
208
|
+
false_easting: 0, false_northing: 0,
|
209
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
210
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
211
|
+
assert(proj)
|
212
|
+
end
|
213
|
+
|
214
|
+
def test_eckert_v
|
215
|
+
context = Proj::Context.new
|
216
|
+
proj = Proj::Projection.eckert_v(context, center_long: 0,
|
217
|
+
false_easting: 0, false_northing: 0,
|
218
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
219
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
220
|
+
assert(proj)
|
221
|
+
end
|
222
|
+
|
223
|
+
def test_eckert_vi
|
224
|
+
context = Proj::Context.new
|
225
|
+
proj = Proj::Projection.eckert_vi(context, center_long: 0,
|
226
|
+
false_easting: 0, false_northing: 0,
|
227
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
228
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
229
|
+
assert(proj)
|
230
|
+
end
|
231
|
+
|
232
|
+
def test_equidistant_cylindrical
|
233
|
+
context = Proj::Context.new
|
234
|
+
proj = Proj::Projection.equidistant_cylindrical(context, latitude_first_parallel: 0, longitude_nat_origin: 0,
|
235
|
+
false_easting: 0, false_northing: 0,
|
236
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
237
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
238
|
+
assert(proj)
|
239
|
+
end
|
240
|
+
|
241
|
+
def test_equidistant_cylindrical_spherical
|
242
|
+
context = Proj::Context.new
|
243
|
+
proj = Proj::Projection.equidistant_cylindrical_spherical(context, latitude_first_parallel: 0, longitude_nat_origin: 0,
|
244
|
+
false_easting: 0, false_northing: 0,
|
245
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
246
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
247
|
+
assert(proj)
|
248
|
+
end
|
249
|
+
|
250
|
+
def test_gall
|
251
|
+
context = Proj::Context.new
|
252
|
+
proj = Proj::Projection.gall(context, center_long: 0,
|
253
|
+
false_easting: 0, false_northing: 0,
|
254
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
255
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
256
|
+
assert(proj)
|
257
|
+
end
|
258
|
+
|
259
|
+
def test_goode_homolosine
|
260
|
+
context = Proj::Context.new
|
261
|
+
proj = Proj::Projection.goode_homolosine(context, center_long: 0,
|
262
|
+
false_easting: 0, false_northing: 0,
|
263
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
264
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
265
|
+
assert(proj)
|
266
|
+
end
|
267
|
+
|
268
|
+
def test_interrupted_goode_homolosine
|
269
|
+
context = Proj::Context.new
|
270
|
+
proj = Proj::Projection.interrupted_goode_homolosine(context, center_long: 0,
|
271
|
+
false_easting: 0, false_northing: 0,
|
272
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
273
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
274
|
+
assert(proj)
|
275
|
+
end
|
276
|
+
|
277
|
+
def test_geostationary_satellite_sweep_x
|
278
|
+
context = Proj::Context.new
|
279
|
+
proj = Proj::Projection.geostationary_satellite_sweep_x(context, center_long: 0, height: 0,
|
280
|
+
false_easting: 0, false_northing: 0,
|
281
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
282
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
283
|
+
assert(proj)
|
284
|
+
end
|
285
|
+
|
286
|
+
def test_geostationary_satellite_sweep_y
|
287
|
+
context = Proj::Context.new
|
288
|
+
proj = Proj::Projection.geostationary_satellite_sweep_y(context, center_long: 0, height: 0,
|
289
|
+
false_easting: 0, false_northing: 0,
|
290
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
291
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
292
|
+
assert(proj)
|
293
|
+
end
|
294
|
+
|
295
|
+
def test_gnomonic
|
296
|
+
context = Proj::Context.new
|
297
|
+
proj = Proj::Projection.gnomonic(context, center_lat: 0, center_long: 0,
|
298
|
+
false_easting: 0, false_northing: 0,
|
299
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
300
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
301
|
+
assert(proj)
|
302
|
+
end
|
303
|
+
|
304
|
+
def test_hotine_oblique_mercator_variant_a
|
305
|
+
context = Proj::Context.new
|
306
|
+
proj = Proj::Projection.hotine_oblique_mercator_variant_a(context,
|
307
|
+
latitude_projection_centre: 0, longitude_projection_centre: 0,
|
308
|
+
azimuth_initial_line: 0, angle_from_rectified_to_skrew_grid: 0,
|
309
|
+
scale: 0,
|
310
|
+
false_easting: 0, false_northing: 0,
|
311
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
312
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
313
|
+
assert(proj)
|
314
|
+
end
|
315
|
+
|
316
|
+
def test_hotine_oblique_mercator_variant_b
|
317
|
+
context = Proj::Context.new
|
318
|
+
proj = Proj::Projection.hotine_oblique_mercator_variant_b(context,
|
319
|
+
latitude_projection_centre: 0, longitude_projection_centre: 0,
|
320
|
+
azimuth_initial_line: 0, angle_from_rectified_to_skrew_grid: 0,
|
321
|
+
scale: 0,
|
322
|
+
easting_projection_centre: 0, northing_projection_centre: 0,
|
323
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
324
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
325
|
+
assert(proj)
|
326
|
+
end
|
327
|
+
|
328
|
+
def test_hotine_oblique_mercator_two_point_natural_origin
|
329
|
+
context = Proj::Context.new
|
330
|
+
proj = Proj::Projection.hotine_oblique_mercator_two_point_natural_origin(context, latitude_projection_centre: 0,
|
331
|
+
latitude_point1: 0, longitude_point1: 0,
|
332
|
+
latitude_point2: 0, longitude_point2: 0,
|
333
|
+
scale: 0,
|
334
|
+
easting_projection_centre: 0, northing_projection_centre: 0,
|
335
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
336
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
337
|
+
assert(proj)
|
338
|
+
end
|
339
|
+
|
340
|
+
def test_laborde_oblique_mercator
|
341
|
+
context = Proj::Context.new
|
342
|
+
proj = Proj::Projection.laborde_oblique_mercator(context, latitude_projection_centre: 0, longitude_projection_centre: 0,
|
343
|
+
azimuth_initial_line: 0,
|
344
|
+
scale: 0,
|
345
|
+
false_easting: 0, false_northing: 0,
|
346
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
347
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
348
|
+
assert(proj)
|
349
|
+
end
|
350
|
+
|
351
|
+
def test_international_map_world_polyconic
|
352
|
+
context = Proj::Context.new
|
353
|
+
proj = Proj::Projection.international_map_world_polyconic(context, center_long: 0,
|
354
|
+
latitude_first_parallel: 0, latitude_second_parallel: 0,
|
355
|
+
false_easting: 0, false_northing: 0,
|
356
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
357
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
358
|
+
assert(proj)
|
359
|
+
end
|
360
|
+
|
361
|
+
def test_krovak_north_oriented
|
362
|
+
context = Proj::Context.new
|
363
|
+
proj = Proj::Projection.krovak_north_oriented(context, latitude_projection_centre: 0, longitude_of_origin: 0,
|
364
|
+
colatitude_cone_axis: 0, latitude_pseudo_standard_parallel: 0,
|
365
|
+
scale_factor_pseudo_standard_parallel: 0,
|
366
|
+
false_easting: 0, false_northing: 0,
|
367
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
368
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
369
|
+
assert(proj)
|
370
|
+
end
|
371
|
+
|
372
|
+
def test_krovak
|
373
|
+
context = Proj::Context.new
|
374
|
+
proj = Proj::Projection.krovak(context, latitude_projection_centre: 0, longitude_of_origin: 0,
|
375
|
+
colatitude_cone_axis: 0, latitude_pseudo_standard_parallel: 0,
|
376
|
+
scale_factor_pseudo_standard_parallel: 0,
|
377
|
+
false_easting: 0, false_northing: 0,
|
378
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
379
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
380
|
+
assert(proj)
|
381
|
+
end
|
382
|
+
|
383
|
+
def test_lambert_azimuthal_equal_area
|
384
|
+
context = Proj::Context.new
|
385
|
+
proj = Proj::Projection.lambert_azimuthal_equal_area(context, latitude_nat_origin: 0, longitude_nat_origin: 0,
|
386
|
+
false_easting: 0, false_northing: 0,
|
387
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
388
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
389
|
+
assert(proj)
|
390
|
+
end
|
391
|
+
|
392
|
+
def test_miller_cylindrical
|
393
|
+
context = Proj::Context.new
|
394
|
+
proj = Proj::Projection.miller_cylindrical(context, center_long: 0,
|
395
|
+
false_easting: 0, false_northing: 0,
|
396
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
397
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
398
|
+
assert(proj)
|
399
|
+
end
|
400
|
+
|
401
|
+
def test_mercator_variant_a
|
402
|
+
context = Proj::Context.new
|
403
|
+
proj = Proj::Projection.mercator_variant_a(context, center_lat: 0, center_long: 0,
|
404
|
+
scale: 0,
|
405
|
+
false_easting: 0, false_northing: 0,
|
406
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
407
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
408
|
+
assert(proj)
|
409
|
+
end
|
410
|
+
|
411
|
+
def test_mercator_variant_b
|
412
|
+
context = Proj::Context.new
|
413
|
+
proj = Proj::Projection.mercator_variant_b(context, latitude_first_parallel: 0, center_long: 0,
|
414
|
+
false_easting: 0, false_northing: 0,
|
415
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
416
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
417
|
+
assert(proj)
|
418
|
+
end
|
419
|
+
|
420
|
+
def test_popular_visualisation_pseudo_mercator
|
421
|
+
context = Proj::Context.new
|
422
|
+
proj = Proj::Projection.popular_visualisation_pseudo_mercator(context, center_lat: 0, center_long: 0,
|
423
|
+
false_easting: 0, false_northing: 0,
|
424
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
425
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
426
|
+
assert(proj)
|
427
|
+
end
|
428
|
+
|
429
|
+
def test_mollweide
|
430
|
+
context = Proj::Context.new
|
431
|
+
proj = Proj::Projection.mollweide(context, center_long: 0,
|
432
|
+
false_easting: 0, false_northing: 0,
|
433
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
434
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
435
|
+
assert(proj)
|
436
|
+
end
|
437
|
+
|
438
|
+
def test_new_zealand_mapping_grid
|
439
|
+
context = Proj::Context.new
|
440
|
+
proj = Proj::Projection.new_zealand_mapping_grid(context, center_lat: 0, center_long: 0,
|
441
|
+
false_easting: 0, false_northing: 0,
|
442
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
443
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
444
|
+
assert(proj)
|
445
|
+
end
|
446
|
+
|
447
|
+
def test_oblique_stereographic
|
448
|
+
context = Proj::Context.new
|
449
|
+
proj = Proj::Projection.oblique_stereographic(context, center_lat: 0, center_long: 0,
|
450
|
+
scale: 0,
|
451
|
+
false_easting: 0, false_northing: 0,
|
452
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
453
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
454
|
+
assert(proj)
|
455
|
+
end
|
456
|
+
|
457
|
+
def test_orthographic
|
458
|
+
context = Proj::Context.new
|
459
|
+
proj = Proj::Projection.orthographic(context, center_lat: 0, center_long: 0,
|
460
|
+
false_easting: 0, false_northing: 0,
|
461
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
462
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
463
|
+
assert(proj)
|
464
|
+
end
|
465
|
+
|
466
|
+
def test_american_polyconic
|
467
|
+
context = Proj::Context.new
|
468
|
+
proj = Proj::Projection.american_polyconic(context, center_lat: 0, center_long: 0,
|
469
|
+
false_easting: 0, false_northing: 0,
|
470
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
471
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
472
|
+
assert(proj)
|
473
|
+
end
|
474
|
+
|
475
|
+
def test_polar_stereographic_variant_a
|
476
|
+
context = Proj::Context.new
|
477
|
+
proj = Proj::Projection.polar_stereographic_variant_a(context, center_lat: 0, center_long: 0,
|
478
|
+
scale: 0,
|
479
|
+
false_easting: 0, false_northing: 0,
|
480
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
481
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
482
|
+
assert(proj)
|
483
|
+
end
|
484
|
+
|
485
|
+
def test_polar_stereographic_variant_b
|
486
|
+
context = Proj::Context.new
|
487
|
+
proj = Proj::Projection.polar_stereographic_variant_b(context, latitude_standard_parallel: 0, longitude_of_origin: 0,
|
488
|
+
false_easting: 0, false_northing: 0,
|
489
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
490
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
491
|
+
assert(proj)
|
492
|
+
end
|
493
|
+
|
494
|
+
def test_robinson
|
495
|
+
context = Proj::Context.new
|
496
|
+
proj = Proj::Projection.robinson(context, center_long: 0,
|
497
|
+
false_easting: 0, false_northing: 0,
|
498
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
499
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
500
|
+
assert(proj)
|
501
|
+
end
|
502
|
+
|
503
|
+
def test_sinusoidal
|
504
|
+
context = Proj::Context.new
|
505
|
+
proj = Proj::Projection.sinusoidal(context, center_long: 0,
|
506
|
+
false_easting: 0, false_northing: 0,
|
507
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
508
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
509
|
+
assert(proj)
|
510
|
+
end
|
511
|
+
|
512
|
+
def test_stereographic
|
513
|
+
context = Proj::Context.new
|
514
|
+
proj = Proj::Projection.stereographic(context, center_lat: 0, center_long: 0,
|
515
|
+
scale: 0,
|
516
|
+
false_easting: 0, false_northing: 0,
|
517
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
518
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
519
|
+
assert(proj)
|
520
|
+
end
|
521
|
+
|
522
|
+
def test_van_der_grinten
|
523
|
+
context = Proj::Context.new
|
524
|
+
proj = Proj::Projection.van_der_grinten(context, center_long: 0,
|
525
|
+
false_easting: 0, false_northing: 0,
|
526
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
527
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
528
|
+
assert(proj)
|
529
|
+
end
|
530
|
+
|
531
|
+
def test_wagner_i
|
532
|
+
context = Proj::Context.new
|
533
|
+
proj = Proj::Projection.wagner_i(context, center_long: 0,
|
534
|
+
false_easting: 0, false_northing: 0,
|
535
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
536
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
537
|
+
assert(proj)
|
538
|
+
end
|
539
|
+
|
540
|
+
def test_wagner_ii
|
541
|
+
context = Proj::Context.new
|
542
|
+
proj = Proj::Projection.wagner_ii(context, center_long: 0,
|
543
|
+
false_easting: 0, false_northing: 0,
|
544
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
545
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
546
|
+
assert(proj)
|
547
|
+
end
|
548
|
+
|
549
|
+
def test_wagner_iii
|
550
|
+
context = Proj::Context.new
|
551
|
+
proj = Proj::Projection.wagner_iii(context, latitude_true_scale: 0,
|
552
|
+
center_long: 0,
|
553
|
+
false_easting: 0, false_northing: 0,
|
554
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
555
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
556
|
+
assert(proj)
|
557
|
+
end
|
558
|
+
|
559
|
+
def test_wagner_iv
|
560
|
+
context = Proj::Context.new
|
561
|
+
proj = Proj::Projection.wagner_iv(context, center_long: 0,
|
562
|
+
false_easting: 0, false_northing: 0,
|
563
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
564
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
565
|
+
assert(proj)
|
566
|
+
end
|
567
|
+
|
568
|
+
def test_wagner_v
|
569
|
+
context = Proj::Context.new
|
570
|
+
proj = Proj::Projection.wagner_v(context, center_long: 0,
|
571
|
+
false_easting: 0, false_northing: 0,
|
572
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
573
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
574
|
+
assert(proj)
|
575
|
+
end
|
576
|
+
|
577
|
+
def test_wagner_vi
|
578
|
+
context = Proj::Context.new
|
579
|
+
proj = Proj::Projection.wagner_vi(context, center_long: 0,
|
580
|
+
false_easting: 0, false_northing: 0,
|
581
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
582
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
583
|
+
assert(proj)
|
584
|
+
end
|
585
|
+
|
586
|
+
def test_wagner_vii
|
587
|
+
context = Proj::Context.new
|
588
|
+
proj = Proj::Projection.wagner_vii(context, center_long: 0,
|
589
|
+
false_easting: 0, false_northing: 0,
|
590
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
591
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
592
|
+
assert(proj)
|
593
|
+
end
|
594
|
+
|
595
|
+
def test_quadrilateralized_spherical_cube
|
596
|
+
context = Proj::Context.new
|
597
|
+
proj = Proj::Projection.quadrilateralized_spherical_cube(context, center_lat: 0, center_long: 0,
|
598
|
+
false_easting: 0, false_northing: 0,
|
599
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
600
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
601
|
+
assert(proj)
|
602
|
+
end
|
603
|
+
|
604
|
+
def test_spherical_cross_track_height
|
605
|
+
context = Proj::Context.new
|
606
|
+
proj = Proj::Projection.spherical_cross_track_height(context, peg_point_lat: 0, peg_point_long: 0,
|
607
|
+
peg_point_heading: 0, peg_point_height: 0,
|
608
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
609
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
610
|
+
assert(proj)
|
611
|
+
end
|
612
|
+
|
613
|
+
def test_equal_earth
|
614
|
+
context = Proj::Context.new
|
615
|
+
proj = Proj::Projection.equal_earth(context, center_long: 0,
|
616
|
+
false_easting: 0, false_northing: 0,
|
617
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
618
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
619
|
+
assert(proj)
|
620
|
+
end
|
621
|
+
|
622
|
+
def test_vertical_perspective
|
623
|
+
context = Proj::Context.new
|
624
|
+
proj = Proj::Projection.vertical_perspective(context,
|
625
|
+
topo_origin_lat: 0, topo_origin_long: 0, topo_origin_height: 0,
|
626
|
+
view_point_height: 0,
|
627
|
+
false_easting: 0, false_northing: 0,
|
628
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433,
|
629
|
+
linear_unit_name: "Metre", linear_unit_conv_factor: 1.0)
|
630
|
+
assert(proj)
|
631
|
+
end
|
632
|
+
|
633
|
+
def test_pole_rotation_grib_convention
|
634
|
+
context = Proj::Context.new
|
635
|
+
proj = Proj::Projection.pole_rotation_grib_convention(context,
|
636
|
+
south_pole_lat_in_unrotated_crs: 0, south_pole_long_in_unrotated_crs: 0,
|
637
|
+
axis_rotation: 0,
|
638
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433)
|
639
|
+
assert(proj)
|
640
|
+
end
|
641
|
+
|
642
|
+
def test_pole_rotation_netcdf_cf_convention
|
643
|
+
context = Proj::Context.new
|
644
|
+
proj = Proj::Projection.pole_rotation_netcdf_cf_convention(context,
|
645
|
+
grid_north_pole_latitude: 0, grid_north_pole_longitude: 0,
|
646
|
+
north_pole_grid_longitude: 0,
|
647
|
+
ang_unit_name: "Degree", ang_unit_conv_factor: 0.0174532925199433)
|
648
|
+
assert(proj)
|
649
|
+
end
|
650
|
+
end
|