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